From 79fe54f94987cfd9c8ba41848b818b1842ffdefa Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 2 Nov 2023 18:00:00 +0000 Subject: [PATCH 1/2] feat: add Automation API and Rollback API chore: update platform logs docs: small documentation updates PiperOrigin-RevId: 578872129 Source-Link: https://github.com/googleapis/googleapis/commit/41d7a832828ef42fcf6d97d48f4802b55628126f Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb84145fc26cf1f77d65af9ad82a239dfddc16bd Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRlcGxveS8uT3dsQm90LnlhbWwiLCJoIjoiZWI4NDE0NWZjMjZjZjFmNzdkNjVhZjlhZDgyYTIzOWRmZGRjMTZiZCJ9 --- .../google-cloud-deploy/v1/.eslintignore | 7 + .../google-cloud-deploy/v1/.eslintrc.json | 3 + .../google-cloud-deploy/v1/.gitignore | 14 + .../google-cloud-deploy/v1/.jsdoc.js | 55 + .../google-cloud-deploy/v1/.mocharc.js | 33 + .../google-cloud-deploy/v1/.prettierrc.js | 22 + .../google-cloud-deploy/v1/README.md | 1 + .../google-cloud-deploy/v1/package.json | 58 + .../cloud/deploy/v1/automation_payload.proto | 41 + .../deploy/v1/automationrun_payload.proto | 50 + .../google/cloud/deploy/v1/cloud_deploy.proto | 3678 +++++++++ ...eliverypipeline_notification_payload.proto | 38 + .../v1/jobrun_notification_payload.proto | 50 + .../google/cloud/deploy/v1/log_enums.proto | 49 + .../v1/release_notification_payload.proto | 38 + .../deploy/v1/release_render_payload.proto | 38 + .../v1/rollout_notification_payload.proto | 47 + .../deploy/v1/rollout_update_payload.proto | 94 + .../v1/target_notification_payload.proto | 38 + .../v1/cloud_deploy.abandon_release.js | 62 + .../v1/cloud_deploy.advance_rollout.js | 67 + .../v1/cloud_deploy.approve_rollout.js | 67 + .../v1/cloud_deploy.cancel_automation_run.js | 62 + .../v1/cloud_deploy.cancel_rollout.js | 62 + .../v1/cloud_deploy.create_automation.js | 93 + .../cloud_deploy.create_delivery_pipeline.js | 93 + .../v1/cloud_deploy.create_release.js | 93 + .../v1/cloud_deploy.create_rollout.js | 98 + .../v1/cloud_deploy.create_target.js | 93 + .../v1/cloud_deploy.delete_automation.js | 94 + .../cloud_deploy.delete_delivery_pipeline.js | 99 + .../v1/cloud_deploy.delete_target.js | 93 + .../v1/cloud_deploy.get_automation.js | 62 + .../v1/cloud_deploy.get_automation_run.js | 62 + .../generated/v1/cloud_deploy.get_config.js | 61 + .../v1/cloud_deploy.get_delivery_pipeline.js | 62 + .../generated/v1/cloud_deploy.get_job_run.js | 62 + .../generated/v1/cloud_deploy.get_release.js | 62 + .../generated/v1/cloud_deploy.get_rollout.js | 62 + .../generated/v1/cloud_deploy.get_target.js | 62 + .../generated/v1/cloud_deploy.ignore_job.js | 72 + .../v1/cloud_deploy.list_automation_runs.js | 88 + .../v1/cloud_deploy.list_automations.js | 88 + .../cloud_deploy.list_delivery_pipelines.js | 87 + .../v1/cloud_deploy.list_job_runs.js | 87 + .../v1/cloud_deploy.list_releases.js | 88 + .../v1/cloud_deploy.list_rollouts.js | 87 + .../generated/v1/cloud_deploy.list_targets.js | 88 + .../generated/v1/cloud_deploy.retry_job.js | 72 + .../v1/cloud_deploy.rollback_target.js | 93 + .../v1/cloud_deploy.terminate_job_run.js | 62 + .../v1/cloud_deploy.update_automation.js | 95 + .../cloud_deploy.update_delivery_pipeline.js | 95 + .../v1/cloud_deploy.update_target.js | 95 + ...ippet_metadata_google.cloud.deploy.v1.json | 1759 +++++ .../google-cloud-deploy/v1/src/index.ts | 25 + .../v1/src/v1/cloud_deploy_client.ts | 5703 ++++++++++++++ .../v1/src/v1/cloud_deploy_client_config.json | 212 + .../v1/src/v1/cloud_deploy_proto_list.json | 13 + .../v1/src/v1/gapic_metadata.json | 401 + .../google-cloud-deploy/v1/src/v1/index.ts | 19 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_cloud_deploy_v1.ts | 6938 +++++++++++++++++ .../google-cloud-deploy/v1/tsconfig.json | 19 + .../google-cloud-deploy/v1/webpack.config.js | 64 + 67 files changed, 22383 insertions(+) create mode 100644 owl-bot-staging/google-cloud-deploy/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/README.md create mode 100644 owl-bot-staging/google-cloud-deploy/v1/package.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automation_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automationrun_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_update_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_automation_run.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_automation.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_automation.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation_run.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automation_runs.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automations.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.rollback_target.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_automation.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts create mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts create mode 100644 owl-bot-staging/google-cloud-deploy/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-deploy/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-deploy/v1/.eslintignore b/owl-bot-staging/google-cloud-deploy/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json b/owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/.gitignore b/owl-bot-staging/google-cloud-deploy/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js b/owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js new file mode 100644 index 00000000000..dc4828af534 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/deploy', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-deploy/v1/.mocharc.js b/owl-bot-staging/google-cloud-deploy/v1/.mocharc.js new file mode 100644 index 00000000000..1a38f257db7 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js b/owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js new file mode 100644 index 00000000000..55639e70f9e --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/README.md b/owl-bot-staging/google-cloud-deploy/v1/README.md new file mode 100644 index 00000000000..b3f04f9632e --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/README.md @@ -0,0 +1 @@ +Deploy: Nodejs Client diff --git a/owl-bot-staging/google-cloud-deploy/v1/package.json b/owl-bot-staging/google-cloud-deploy/v1/package.json new file mode 100644 index 00000000000..f6d3c40c885 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/deploy", + "version": "0.1.0", + "description": "Deploy client for Node.js", + "repository": "googleapis/nodejs-deploy", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google deploy", + "deploy", + "cloud deploy" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.0.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.1", + "@types/node": "^18.11.18", + "@types/sinon": "^10.0.17", + "c8": "^8.0.1", + "gapic-tools": "^0.2.0", + "gts": "5.0.1", + "jsdoc": "^4.0.2", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.2.0", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automation_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automation_payload.proto new file mode 100644 index 00000000000..8a3ca07410f --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automation_payload.proto @@ -0,0 +1,41 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "AutomationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/automation" +// Platform Log event that describes the Automation related events. +message AutomationEvent { + // Debug message for when there is an update on the AutomationRun. + // Provides further details about the resource creation or state change. + string message = 1; + + // The name of the `AutomationRun`. + string automation = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 4; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automationrun_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automationrun_payload.proto new file mode 100644 index 00000000000..b34192ceb9d --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automationrun_payload.proto @@ -0,0 +1,50 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "AutomationRunPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/automation_run" +// Platform Log event that describes the AutomationRun related events. +message AutomationRunEvent { + // Debug message for when there is an update on the AutomationRun. + // Provides further details about the resource creation or state change. + string message = 1; + + // The name of the `AutomationRun`. + string automation_run = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Identifier of the `Automation`. + string automation_id = 4; + + // Identifier of the `Automation` rule. + string rule_id = 5; + + // ID of the `Target` to which the `AutomationRun` is created. + string destination_target_id = 6; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 7; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto new file mode 100644 index 00000000000..c6e5782a37c --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -0,0 +1,3678 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.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"; +import "google/type/date.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "CloudDeployProto"; +option java_package = "com.google.cloud.deploy.v1"; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/Build" + pattern: "projects/{project}/locations/{location}/builds/{build}" +}; +option (google.api.resource_definition) = { + type: "container.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" +}; +option (google.api.resource_definition) = { + type: "clouddeploy.googleapis.com/Operation" + pattern: "projects/{project}/locations/{location}/operations/{operation}" +}; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/WorkerPool" + pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" +}; +option (google.api.resource_definition) = { + type: "gkehub.googleapis.com/Membership" + pattern: "projects/{project}/locations/{location}/memberships/{membership}" +}; +option (google.api.resource_definition) = { + type: "run.googleapis.com/Service" + pattern: "projects/{project}/locations/{location}/services/{service}" +}; +option (google.api.resource_definition) = { + type: "run.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" +}; + +// CloudDeploy service creates and manages Continuous Delivery operations +// on Google Cloud Platform via Skaffold (https://skaffold.dev). +service CloudDeploy { + option (google.api.default_host) = "clouddeploy.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists DeliveryPipelines in a given project and location. + rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest) + returns (ListDeliveryPipelinesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DeliveryPipeline. + rpc GetDeliveryPipeline(GetDeliveryPipelineRequest) + returns (DeliveryPipeline) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new DeliveryPipeline in a given project and location. + rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" + body: "delivery_pipeline" + }; + option (google.api.method_signature) = + "parent,delivery_pipeline,delivery_pipeline_id"; + option (google.longrunning.operation_info) = { + response_type: "DeliveryPipeline" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single DeliveryPipeline. + rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}" + body: "delivery_pipeline" + }; + option (google.api.method_signature) = "delivery_pipeline,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DeliveryPipeline" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single DeliveryPipeline. + rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Targets in a given project and location. + rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/targets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a `Rollout` to roll back the specified target. + rpc RollbackTarget(RollbackTargetRequest) returns (RollbackTargetResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget" + body: "*" + }; + option (google.api.method_signature) = "name,target_id,rollout_id"; + } + + // Gets details of a single Target. + rpc GetTarget(GetTargetRequest) returns (Target) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/targets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Target in a given project and location. + rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/targets" + body: "target" + }; + option (google.api.method_signature) = "parent,target,target_id"; + option (google.longrunning.operation_info) = { + response_type: "Target" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Target. + rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{target.name=projects/*/locations/*/targets/*}" + body: "target" + }; + option (google.api.method_signature) = "target,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Target" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Target. + rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/targets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Releases in a given project and location. + rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Release. + rpc GetRelease(GetReleaseRequest) returns (Release) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Release in a given project and location. + rpc CreateRelease(CreateReleaseRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" + body: "release" + }; + option (google.api.method_signature) = "parent,release,release_id"; + option (google.longrunning.operation_info) = { + response_type: "Release" + metadata_type: "OperationMetadata" + }; + } + + // Abandons a Release in the Delivery Pipeline. + rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Approves a Rollout. + rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Advances a Rollout in a given project and location. + rpc AdvanceRollout(AdvanceRolloutRequest) returns (AdvanceRolloutResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:advance" + body: "*" + }; + option (google.api.method_signature) = "name,phase_id"; + } + + // Cancels a Rollout in a given project and location. + rpc CancelRollout(CancelRolloutRequest) returns (CancelRolloutResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Rollouts in a given project and location. + rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Rollout. + rpc GetRollout(GetRolloutRequest) returns (Rollout) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Rollout in a given project and location. + rpc CreateRollout(CreateRolloutRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" + body: "rollout" + }; + option (google.api.method_signature) = "parent,rollout,rollout_id"; + option (google.longrunning.operation_info) = { + response_type: "Rollout" + metadata_type: "OperationMetadata" + }; + } + + // Ignores the specified Job in a Rollout. + rpc IgnoreJob(IgnoreJobRequest) returns (IgnoreJobResponse) { + option (google.api.http) = { + post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:ignoreJob" + body: "*" + }; + option (google.api.method_signature) = "rollout,phase_id,job_id"; + } + + // Retries the specified Job in a Rollout. + rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) { + option (google.api.http) = { + post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob" + body: "*" + }; + option (google.api.method_signature) = "rollout,phase_id,job_id"; + } + + // Lists JobRuns in a given project and location. + rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single JobRun. + rpc GetJobRun(GetJobRunRequest) returns (JobRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Terminates a Job Run in a given project and location. + rpc TerminateJobRun(TerminateJobRunRequest) + returns (TerminateJobRunResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}:terminate" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the configuration for a location. + rpc GetConfig(GetConfigRequest) returns (Config) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/config}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Automation in a given project and location. + rpc CreateAutomation(CreateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + body: "automation" + }; + option (google.api.method_signature) = "parent,automation,automation_id"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Automation resource. + rpc UpdateAutomation(UpdateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + body: "automation" + }; + option (google.api.method_signature) = "automation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Automation resource. + rpc DeleteAutomation(DeleteAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Automation. + rpc GetAutomation(GetAutomationRequest) returns (Automation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Automations in a given project and location. + rpc ListAutomations(ListAutomationsRequest) + returns (ListAutomationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AutomationRun. + rpc GetAutomationRun(GetAutomationRunRequest) returns (AutomationRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists AutomationRuns in a given project and location. + rpc ListAutomationRuns(ListAutomationRunsRequest) + returns (ListAutomationRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels an AutomationRun. The `state` of the `AutomationRun` after + // cancelling is `CANCELLED`. `CancelAutomationRun` can be called on + // AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun + // in a different state returns an `FAILED_PRECONDITION` error. + rpc CancelAutomationRun(CancelAutomationRunRequest) + returns (CancelAutomationRunResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// A `DeliveryPipeline` resource in the Cloud Deploy API. +// +// A `DeliveryPipeline` defines a pipeline through which a Skaffold +// configuration can progress. +message DeliveryPipeline { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" + }; + + // Optional. Name of the `DeliveryPipeline`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `DeliveryPipeline`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `DeliveryPipeline`. Max length is 255 characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Cloud Deploy. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. + map labels = 5; + + // Output only. Time at which the pipeline was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent time at which the pipeline was updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The ordering configuration of the `DeliveryPipeline`. + oneof pipeline { + // SerialPipeline defines a sequential set of stages for a + // `DeliveryPipeline`. + SerialPipeline serial_pipeline = 8; + } + + // Output only. Information around the state of the Delivery Pipeline. + PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; + + // When suspended, no new releases or rollouts can be created, + // but in-progress ones will complete. + bool suspended = 12; +} + +// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`. +message SerialPipeline { + // Each stage specifies configuration for a `Target`. The ordering + // of this list defines the promotion flow. + repeated Stage stages = 1; +} + +// Stage specifies a location to which to deploy. +message Stage { + // The target_id to which this stage points. This field refers exclusively to + // the last segment of a target name. For example, this field would just be + // `my-target` (rather than + // `projects/project/locations/location/targets/my-target`). The location of + // the `Target` is inferred to be the same as the location of the + // `DeliveryPipeline` that contains this `Stage`. + string target_id = 1; + + // Skaffold profiles to use when rendering the manifest for this stage's + // `Target`. + repeated string profiles = 2; + + // Optional. The strategy to use for a `Rollout` to this stage. + Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The deploy parameters to use for the target in this stage. + repeated DeployParameters deploy_parameters = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// DeployParameters contains deploy parameters information. +message DeployParameters { + // Required. Values are deploy parameters in key-value pairs. + map values = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Deploy parameters are applied to targets with match labels. + // If unspecified, deploy parameters are applied to all targets (including + // child targets of a multi-target). + map match_target_labels = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Strategy contains deployment strategy information. +message Strategy { + // Deployment strategy details. + oneof deployment_strategy { + // Standard deployment strategy executes a single deploy and allows + // verifying the deployment. + Standard standard = 1; + + // Canary deployment strategy provides progressive percentage based + // deployments to a Target. + Canary canary = 2; + } +} + +// Predeploy contains the predeploy job configuration information. +message Predeploy { + // Optional. A sequence of Skaffold custom actions to invoke during execution + // of the predeploy job. + repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Postdeploy contains the postdeploy job configuration information. +message Postdeploy { + // Optional. A sequence of Skaffold custom actions to invoke during execution + // of the postdeploy job. + repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Standard represents the standard deployment strategy. +message Standard { + // Whether to verify a deployment. + bool verify = 1; + + // Optional. Configuration for the predeploy job. If this is not configured, + // predeploy job will not be present. + Predeploy predeploy = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the postdeploy job. If this is not configured, + // postdeploy job will not be present. + Postdeploy postdeploy = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Canary represents the canary deployment strategy. +message Canary { + // Optional. Runtime specific configurations for the deployment strategy. The + // runtime configuration is used to determine how Cloud Deploy will split + // traffic to enable a progressive deployment. + RuntimeConfig runtime_config = 1 [(google.api.field_behavior) = OPTIONAL]; + + // The mode to use for the canary deployment strategy. + oneof mode { + // Configures the progressive based deployment for a Target. + CanaryDeployment canary_deployment = 2; + + // Configures the progressive based deployment for a Target, but allows + // customizing at the phase level where a phase represents each of the + // percentage deployments. + CustomCanaryDeployment custom_canary_deployment = 3; + } +} + +// CanaryDeployment represents the canary deployment configuration +message CanaryDeployment { + // Required. The percentage based deployments that will occur as a part of a + // `Rollout`. List is expected in ascending order and each integer n is + // 0 <= n < 100. + repeated int32 percentages = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether to run verify tests after each percentage deployment. + bool verify = 2; + + // Optional. Configuration for the predeploy job of the first phase. If this + // is not configured, there will be no predeploy job for this phase. + Predeploy predeploy = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the postdeploy job of the last phase. If this + // is not configured, there will be no postdeploy job for this phase. + Postdeploy postdeploy = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// CustomCanaryDeployment represents the custom canary deployment +// configuration. +message CustomCanaryDeployment { + // PhaseConfig represents the configuration for a phase in the custom + // canary deployment. + message PhaseConfig { + // Required. The ID to assign to the `Rollout` phase. + // This value must consist of lower-case letters, numbers, and hyphens, + // start with a letter and end with a letter or a number, and have a max + // length of 63 characters. In other words, it must match the following + // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + string phase_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Percentage deployment for the phase. + int32 percentage = 2 [(google.api.field_behavior) = REQUIRED]; + + // Skaffold profiles to use when rendering the manifest for this phase. + // These are in addition to the profiles list specified in the + // `DeliveryPipeline` stage. + repeated string profiles = 3; + + // Whether to run verify tests after the deployment. + bool verify = 4; + + // Optional. Configuration for the predeploy job of this phase. If this is + // not configured, there will be no predeploy job for this phase. + Predeploy predeploy = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the postdeploy job of this phase. If this is + // not configured, there will be no postdeploy job for this phase. + Postdeploy postdeploy = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Configuration for each phase in the canary deployment in the + // order executed. + repeated PhaseConfig phase_configs = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// KubernetesConfig contains the Kubernetes runtime configuration. +message KubernetesConfig { + // Information about the Kubernetes Gateway API service mesh configuration. + message GatewayServiceMesh { + // Required. Name of the Gateway API HTTPRoute. + string http_route = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Kubernetes Service. + string service = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Kubernetes Deployment whose traffic is managed by + // the specified HTTPRoute and Service. + string deployment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The time to wait for route updates to propagate. The maximum + // configurable time is 3 hours, in seconds format. If unspecified, there is + // no wait time. + google.protobuf.Duration route_update_wait_time = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Information about the Kubernetes Service networking configuration. + message ServiceNetworking { + // Required. Name of the Kubernetes Service. + string service = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Kubernetes Deployment whose traffic is managed by + // the specified Service. + string deployment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to disable Pod overprovisioning. If Pod + // overprovisioning is disabled then Cloud Deploy will limit the number of + // total Pods used for the deployment strategy to the number of Pods the + // Deployment has on the cluster. + bool disable_pod_overprovisioning = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The service definition configuration. + oneof service_definition { + // Kubernetes Gateway API service mesh configuration. + GatewayServiceMesh gateway_service_mesh = 1; + + // Kubernetes Service networking configuration. + ServiceNetworking service_networking = 2; + } +} + +// CloudRunConfig contains the Cloud Run runtime configuration. +message CloudRunConfig { + // Whether Cloud Deploy should update the traffic stanza in a Cloud Run + // Service on the user's behalf to facilitate traffic splitting. This is + // required to be true for CanaryDeployments, but optional for + // CustomCanaryDeployments. + bool automatic_traffic_control = 1; +} + +// RuntimeConfig contains the runtime specific configurations for a deployment +// strategy. +message RuntimeConfig { + // The runtime configuration details. + oneof runtime_config { + // Kubernetes runtime configuration. + KubernetesConfig kubernetes = 1; + + // Cloud Run runtime configuration. + CloudRunConfig cloud_run = 2; + } +} + +// PipelineReadyCondition contains information around the status of the +// Pipeline. +message PipelineReadyCondition { + // True if the Pipeline is in a valid state. Otherwise at least one condition + // in `PipelineCondition` is in an invalid state. Iterate over those + // conditions and see which condition(s) has status = false to find out what + // is wrong with the Pipeline. + bool status = 3; + + // Last time the condition was updated. + google.protobuf.Timestamp update_time = 4; +} + +// TargetsPresentCondition contains information on any Targets defined in +// the Delivery Pipeline that do not actually exist. +message TargetsPresentCondition { + // True if there aren't any missing Targets. + bool status = 1; + + // The list of Target names that do not exist. For example, + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + repeated string missing_targets = 2 [(google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + }]; + + // Last time the condition was updated. + google.protobuf.Timestamp update_time = 4; +} + +// TargetsTypeCondition contains information on whether the Targets defined in +// the Delivery Pipeline are of the same type. +message TargetsTypeCondition { + // True if the targets are all a comparable type. For example this is true if + // all targets are GKE clusters. This is false if some targets are Cloud Run + // targets and others are GKE clusters. + bool status = 1; + + // Human readable error message. + string error_details = 2; +} + +// PipelineCondition contains all conditions relevant to a Delivery Pipeline. +message PipelineCondition { + // Details around the Pipeline's overall status. + PipelineReadyCondition pipeline_ready_condition = 1; + + // Details around targets enumerated in the pipeline. + TargetsPresentCondition targets_present_condition = 3; + + // Details on the whether the targets enumerated in the pipeline are of the + // same type. + TargetsTypeCondition targets_type_condition = 4; +} + +// The request object for `ListDeliveryPipelines`. +message ListDeliveryPipelinesRequest { + // Required. The parent, which owns this collection of pipelines. Format must + // be `projects/{project_id}/locations/{location_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // The maximum number of pipelines to return. The service may return + // fewer than this value. If unspecified, at most 50 pipelines will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListDeliveryPipelines` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter pipelines to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4; + + // Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5; +} + +// The response object from `ListDeliveryPipelines`. +message ListDeliveryPipelinesResponse { + // The `DeliveryPipeline` objects. + repeated DeliveryPipeline delivery_pipelines = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetDeliveryPipeline` +message GetDeliveryPipelineRequest { + // Required. Name of the `DeliveryPipeline`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; +} + +// The request object for `CreateDeliveryPipeline`. +message CreateDeliveryPipelineRequest { + // Required. The parent collection in which the `DeliveryPipeline` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `DeliveryPipeline`. + string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryPipeline` to create. + DeliveryPipeline delivery_pipeline = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateDeliveryPipeline`. +message UpdateDeliveryPipelineRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `DeliveryPipeline` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `DeliveryPipeline` to update. + DeliveryPipeline delivery_pipeline = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `DeliveryPipeline` that does not exist + // will result in the creation of a new `DeliveryPipeline`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteDeliveryPipeline`. +message DeleteDeliveryPipelineRequest { + // Required. The name of the `DeliveryPipeline` to delete. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `DeliveryPipeline` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, all child resources under this pipeline will also + // be deleted. Otherwise, the request will only work if the pipeline has no + // child resources. + bool force = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configs for the Rollback rollout. +message RollbackTargetConfig { + // Optional. The rollback `Rollout` to create. + Rollout rollout = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string starting_phase_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `RollbackTarget`. +message RollbackTargetRequest { + // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Target` that is being rolled back. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the rollback `Rollout` to create. + string rollout_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. ID of the `Release` to roll back to. If this isn't specified, the + // previous successful `Rollout` to the specified target will be used to + // determine the `Release`. + string release_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, this must be the latest `Rollout` that is on the + // `Target`. + string rollout_to_roll_back = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configs for the rollback `Rollout`. + RollbackTargetConfig rollback_config = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with a `RollbackTargetResponse`. + bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `RollbackTarget`. +message RollbackTargetResponse { + // The config of the rollback `Rollout` created or will be created. + RollbackTargetConfig rollback_config = 1; +} + +// A `Target` resource in the Cloud Deploy API. +// +// A `Target` defines a location to which a Skaffold configuration +// can be deployed. +message Target { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Target" + pattern: "projects/{project}/locations/{location}/targets/{target}" + }; + + // Optional. Name of the `Target`. Format is + // `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Resource id of the `Target`. + string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Target`. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Target`. Max length is 255 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User annotations. These attributes can only be set and used by + // the user, and not by Cloud Deploy. See + // https://google.aip.dev/128#annotations for more details such as format and + // size limitations. + map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not the `Target` requires approval. + bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the `Target` was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Most recent time at which the `Target` was updated. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Destination to which the Skaffold configuration is applied during a + // rollout. + oneof deployment_target { + // Optional. Information specifying a GKE Cluster. + GkeCluster gke = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information specifying an Anthos Cluster. + AnthosCluster anthos_cluster = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information specifying a Cloud Run deployment target. + CloudRunLocation run = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information specifying a multiTarget. + MultiTarget multi_target = 19 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Configurations for all execution that relates to this `Target`. + // Each `ExecutionEnvironmentUsage` value may only be used in a single + // configuration; using the same value multiple times is an error. + // When one or more configurations are specified, they must include the + // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. + // When no configurations are specified, execution will use the default + // specified in `DefaultPool`. + repeated ExecutionConfig execution_configs = 16; + + // Optional. The deploy parameters to use for this target. + map deploy_parameters = 20 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration of the environment to use when calling Skaffold. +message ExecutionConfig { + // Possible usages of this configuration. + enum ExecutionEnvironmentUsage { + // Default value. This value is unused. + EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0; + + // Use for rendering. + RENDER = 1; + + // Use for deploying and deployment hooks. + DEPLOY = 2; + + // Use for deployment verification. + VERIFY = 3; + + // Use for predeploy job execution. + PREDEPLOY = 4; + + // Use for postdeploy job execution. + POSTDEPLOY = 5; + } + + // Required. Usages when this configuration should be applied. + repeated ExecutionEnvironmentUsage usages = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Details of the environment. + oneof execution_environment { + // Optional. Use default Cloud Build pool. + DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Use private Cloud Build pool. + PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The resource name of the `WorkerPool`, with the format + // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + // If this optional field is unspecified, the default Cloud Build pool will be + // used. + string worker_pool = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) is used. + string service_account = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location in which to store execution outputs. This + // can either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Execution timeout for a Cloud Build Execution. This must be + // between 10m and 24h in seconds format. If unspecified, a default timeout of + // 1h is used. + google.protobuf.Duration execution_timeout = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Execution using the default Cloud Build pool. +message DefaultPool { + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) will be used. + string service_account = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location where execution outputs should be stored. + // This can either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Execution using a private Cloud Build pool. +message PrivatePool { + // Required. Resource name of the Cloud Build worker pool to use. The format + // is `projects/{project}/locations/{location}/workerPools/{pool}`. + string worker_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Optional. Google service account to use for execution. If unspecified, + // the project execution service account + // (-compute@developer.gserviceaccount.com) will be used. + string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cloud Storage location where execution outputs should be stored. + // This can either be a bucket ("gs://my-bucket") or a path within a bucket + // ("gs://my-bucket/my-dir"). + // If unspecified, a default bucket located in the same region will be used. + string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information specifying a GKE Cluster. +message GkeCluster { + // Information specifying a GKE Cluster. Format is + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. + string cluster = 1 [(google.api.resource_reference) = { + type: "container.googleapis.com/Cluster" + }]; + + // Optional. If true, `cluster` is accessed using the private IP address of + // the control plane endpoint. Otherwise, the default IP address of the + // control plane endpoint is used. The default IP address is the private IP + // address for clusters with private control-plane endpoints and the public IP + // address otherwise. + // + // Only specify this option when `cluster` is a [private GKE + // cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). + bool internal_ip = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Information specifying an Anthos Cluster. +message AnthosCluster { + // Membership of the GKE Hub-registered cluster to which to apply the Skaffold + // configuration. Format is + // `projects/{project}/locations/{location}/memberships/{membership_name}`. + string membership = 1 [(google.api.resource_reference) = { + type: "gkehub.googleapis.com/Membership" + }]; +} + +// Information specifying where to deploy a Cloud Run Service. +message CloudRunLocation { + // Required. The location for the Cloud Run Service. Format must be + // `projects/{project}/locations/{location}`. + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + +// Information specifying a multiTarget. +message MultiTarget { + // Required. The target_ids of this multiTarget. + repeated string target_ids = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The request object for `ListTargets`. +message ListTargetsRequest { + // Required. The parent, which owns this collection of targets. Format must be + // `projects/{project_id}/locations/{location_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Optional. The maximum number of `Target` objects to return. The service may + // return fewer than this value. If unspecified, at most 50 `Target` objects + // will be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListTargets` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter targets to be returned. See https://google.aip.dev/160 for + // more details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for + // more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `ListTargets`. +message ListTargetsResponse { + // The `Target` objects. + repeated Target targets = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetTarget`. +message GetTargetRequest { + // Required. Name of the `Target`. Format must be + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + } + ]; +} + +// The request object for `CreateTarget`. +message CreateTargetRequest { + // Required. The parent collection in which the `Target` should be created. + // Format should be + // `projects/{project_id}/locations/{location_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Required. ID of the `Target`. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Target` to create. + Target target = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateTarget`. +message UpdateTargetRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Target resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Target` to update. + Target target = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Target` that does not exist will + // result in the creation of a new `Target`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteTarget`. +message DeleteTargetRequest { + // Required. The name of the `Target` to delete. Format should be + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Target" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `Target` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Contains criteria for selecting Targets. Attributes provided must match the +// target resource in order for policy restrictions to apply. E.g. if id "prod" +// and labels "foo: bar" are given the target resource must match both that id +// and have that label in order to be selected. +message TargetAttribute { + // ID of the `Target`. The value of this field could be one of the + // following: + // * The last segment of a target name. It only needs the ID to determine + // which target is being referred to + // * "*", all targets in a location. + string id = 1; + + // Target labels. + map labels = 2; +} + +// A `Release` resource in the Cloud Deploy API. +// +// A `Release` defines a specific Skaffold configuration instance +// that can be deployed. +message Release { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Release" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}" + }; + + // Valid states of the render operation. + enum RenderState { + // The render state is unspecified. + RENDER_STATE_UNSPECIFIED = 0; + + // All rendering operations have completed successfully. + SUCCEEDED = 1; + + // All rendering operations have completed, and one or more have failed. + FAILED = 2; + + // Rendering has started and is not complete. + IN_PROGRESS = 3; + } + + // Details of rendering for a single target. + message TargetRender { + // Valid states of the render operation. + enum TargetRenderState { + // The render operation state is unspecified. + TARGET_RENDER_STATE_UNSPECIFIED = 0; + + // The render operation has completed successfully. + SUCCEEDED = 1; + + // The render operation has failed. + FAILED = 2; + + // The render operation is in progress. + IN_PROGRESS = 3; + } + + // Well-known rendering failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or + // because Cloud Deploy has insufficient permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The render operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // Cloud Build failed to fulfill Cloud Deploy's request. See + // failure_message for additional details. + CLOUD_BUILD_REQUEST_FAILED = 3; + + // The render operation did not complete successfully because the + // verification stanza required for verify was not found on the skaffold + // configuration. + VERIFICATION_CONFIG_NOT_FOUND = 4; + + // The render operation did not complete successfully because the custom + // action required for predeploy or postdeploy was not found in the + // skaffold configuration. See failure_message for additional details. + CUSTOM_ACTION_NOT_FOUND = 5; + } + + // Output only. The resource name of the Cloud Build `Build` object that is + // used to render the manifest for this target. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string rendering_build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. Current state of the render operation for this Target. + TargetRenderState rendering_state = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata related to the `Release` render for this Target. + RenderMetadata metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reason this render failed. This will always be unspecified + // while the render in progress. + FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the render failure, if + // available. + string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // ReleaseReadyCondition contains information around the status of the + // Release. If a release is not ready, you cannot create a rollout with the + // release. + message ReleaseReadyCondition { + // True if the Release is in a valid state. Otherwise at least one condition + // in `ReleaseCondition` is in an invalid state. Iterate over those + // conditions and see which condition(s) has status = false to find out what + // is wrong with the Release. + bool status = 1; + } + + // SkaffoldSupportedCondition contains information about when support for the + // release's version of skaffold ends. + message SkaffoldSupportedCondition { + // True if the version of skaffold used by this release is supported. + bool status = 1; + + // The skaffold support state for this release's version of skaffold. + SkaffoldSupportState skaffold_support_state = 2; + + // The time at which this release's version of skaffold will enter + // maintenance mode. + google.protobuf.Timestamp maintenance_mode_time = 3; + + // The time at which this release's version of skaffold will no longer be + // supported. + google.protobuf.Timestamp support_expiration_time = 4; + } + + // ReleaseCondition contains all conditions relevant to a Release. + message ReleaseCondition { + // Details around the Releases's overall status. + ReleaseReadyCondition release_ready_condition = 1; + + // Details around the support state of the release's skaffold + // version. + SkaffoldSupportedCondition skaffold_supported_condition = 2; + } + + // Optional. Name of the `Release`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `Release`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `Release`. Max length is 255 characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations + // for more details such as format and size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. + map labels = 5; + + // Output only. Indicates whether this is an abandoned release. + bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Release` was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the render began. + google.protobuf.Timestamp render_start_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the render completed. + google.protobuf.Timestamp render_end_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Cloud Storage URI of tar.gz archive containing Skaffold configuration. + string skaffold_config_uri = 17; + + // Filepath of the Skaffold config inside of the config URI. + string skaffold_config_path = 9; + + // List of artifacts to pass through to Skaffold command. + repeated BuildArtifact build_artifacts = 10; + + // Output only. Snapshot of the parent pipeline taken at release creation + // time. + DeliveryPipeline delivery_pipeline_snapshot = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the targets taken at release creation time. + repeated Target target_snapshots = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the render operation. + RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; + + // The Skaffold version to use when operating on this release, such as + // "1.20.0". Not all versions are valid; Cloud Deploy supports a specific set + // of versions. + // + // If unset, the most recent supported Skaffold version will be used. + string skaffold_version = 19; + + // Output only. Map from target ID to the target artifacts created + // during the render operation. + map target_artifacts = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map from target ID to details of the render operation for that + // target. + map target_renders = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information around the state of the Release. + ReleaseCondition condition = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The deploy parameters to use for all targets in this release. + map deploy_parameters = 25 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Description of an a image to use during Skaffold rendering. +message BuildArtifact { + // Image name in Skaffold configuration. + string image = 3; + + // Image tag to use. This will generally be the full path to an image, such + // as "gcr.io/my-project/busybox:1.2.3" or + // "gcr.io/my-project/busybox@sha256:abc123". + string tag = 2; +} + +// The artifacts produced by a target render operation. +message TargetArtifact { + // Contains the paths to the artifacts, relative to the URI, for a phase. + message PhaseArtifact { + // Output only. File path of the resolved Skaffold configuration relative to + // the URI. + string skaffold_config_path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the rendered manifest relative to the URI. + string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the directory of rendered job manifests + // relative to the URI. This is only set if it is applicable. + string job_manifests_path = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + oneof uri { + // Output only. URI of a directory containing the artifacts. This contains + // deployment configuration used by Skaffold during a rollout, and all + // paths are relative to this location. + string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. File path of the resolved Skaffold configuration relative to + // the URI. + string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the rendered manifest relative to the URI. + string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map from the phase ID to the phase artifacts for the `Target`. + map phase_artifacts = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The artifacts produced by a deploy operation. +message DeployArtifact { + // Output only. URI of a directory containing the artifacts. All paths are + // relative to this location. + string artifact_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File paths of the manifests applied during the deploy + // operation relative to the URI. + repeated string manifest_paths = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudRunRenderMetadata contains Cloud Run information associated with a +// `Release` render. +message CloudRunRenderMetadata { + // Output only. The name of the Cloud Run Service in the rendered manifest. + // Format is `projects/{project}/locations/{location}/services/{service}`. + string service = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "run.googleapis.com/Service" } + ]; +} + +// RenderMetadata includes information associated with a `Release` render. +message RenderMetadata { + // Output only. Metadata associated with rendering for Cloud Run. + CloudRunRenderMetadata cloud_run = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListReleases`. +message ListReleasesRequest { + // Required. The `DeliveryPipeline` which owns this collection of `Release` + // objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Optional. The maximum number of `Release` objects to return. The service + // may return fewer than this value. If unspecified, at most 50 `Release` + // objects will be returned. The maximum value is 1000; values above 1000 will + // be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListReleases` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter releases to be returned. See https://google.aip.dev/160 + // for more details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for + // more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `ListReleases`. +message ListReleasesResponse { + // The `Release` objects. + repeated Release releases = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetRelease`. +message GetReleaseRequest { + // Required. Name of the `Release`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; +} + +// The request object for `CreateRelease`, +message CreateReleaseRequest { + // Required. The parent collection in which the `Release` should be created. + // Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Release`. + string release_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Release` to create. + Release release = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A `Rollout` resource in the Cloud Deploy API. +// +// A `Rollout` contains information around a specific deployment to a `Target`. +message Rollout { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Rollout" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}" + }; + + // Valid approval states of a `Rollout`. + enum ApprovalState { + // The `Rollout` has an unspecified approval state. + APPROVAL_STATE_UNSPECIFIED = 0; + + // The `Rollout` requires approval. + NEEDS_APPROVAL = 1; + + // The `Rollout` does not require approval. + DOES_NOT_NEED_APPROVAL = 2; + + // The `Rollout` has been approved. + APPROVED = 3; + + // The `Rollout` has been rejected. + REJECTED = 4; + } + + // Valid states of a `Rollout`. + enum State { + // The `Rollout` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `Rollout` has completed successfully. + SUCCEEDED = 1; + + // The `Rollout` has failed. + FAILED = 2; + + // The `Rollout` is being deployed. + IN_PROGRESS = 3; + + // The `Rollout` needs approval. + PENDING_APPROVAL = 4; + + // An approver rejected the `Rollout`. + APPROVAL_REJECTED = 5; + + // The `Rollout` is waiting for an earlier Rollout(s) to complete on this + // `Target`. + PENDING = 6; + + // The `Rollout` is waiting for the `Release` to be fully rendered. + PENDING_RELEASE = 7; + + // The `Rollout` is in the process of being cancelled. + CANCELLING = 8; + + // The `Rollout` has been cancelled. + CANCELLED = 9; + + // The `Rollout` is halted. + HALTED = 10; + } + + // Well-known rollout failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Cloud Deploy has insufficient permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The deploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // Deployment did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // Release is in a failed state. + RELEASE_FAILED = 4; + + // Release is abandoned. + RELEASE_ABANDONED = 5; + + // No skaffold verify configuration was found. + VERIFICATION_CONFIG_NOT_FOUND = 6; + + // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message + // for additional details. + CLOUD_BUILD_REQUEST_FAILED = 7; + } + + // Optional. Name of the `Rollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `Rollout`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the `Rollout` for user purposes. Max length is 255 + // characters. + string description = 3; + + // User annotations. These attributes can only be set and used by the + // user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations + // for more details such as format and size limitations. + map annotations = 4; + + // Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 128 bytes. + map labels = 5; + + // Output only. Time at which the `Rollout` was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` was approved. + google.protobuf.Timestamp approve_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` was enqueued. + google.protobuf.Timestamp enqueue_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` started deploying. + google.protobuf.Timestamp deploy_start_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `Rollout` finished deploying. + google.protobuf.Timestamp deploy_end_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The ID of Target to which this `Rollout` is deploying. + string target_id = 18 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Approval state of the `Rollout`. + ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `Rollout`. + State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the rollout failure, if + // available. + string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the Cloud Build `Build` object that is + // used to deploy the Rollout. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string deploying_build = 17 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 16; + + // Output only. The reason this rollout failed. This will always be + // unspecified while the rollout is in progress. + FailureCause deploy_failure_cause = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phases that represent the workflows of this `Rollout`. + repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata contains information about the rollout. + Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the `ControllerRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + string controller_rollout = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the `Rollout` that is rolled back by this `Rollout`. + // Empty if this `Rollout` wasn't created as a rollback. + string rollback_of_rollout = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Names of `Rollouts` that rolled back this `Rollout`. + repeated string rolled_back_by_rollouts = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata includes information associated with a `Rollout`. +message Metadata { + // Output only. The name of the Cloud Run Service that is associated with a + // `Rollout`. + CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AutomationRolloutMetadata contains the information about the + // interactions between Automation service and this rollout. + AutomationRolloutMetadata automation = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to +// the user. +message DeployJobRunMetadata { + // Output only. The name of the Cloud Run Service that is associated with a + // `DeployJobRun`. + CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudRunMetadata contains information from a Cloud Run deployment. +message CloudRunMetadata { + // Output only. The name of the Cloud Run Service that is associated with a + // `Rollout`. Format is + // `projects/{project}/locations/{location}/services/{service}`. + string service = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "run.googleapis.com/Service" } + ]; + + // Output only. The Cloud Run Service urls that are associated with a + // `Rollout`. + repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Run Revision id associated with a `Rollout`. + string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Cloud Run job that is associated with a + // `Rollout`. Format is + // `projects/{project}/locations/{location}/jobs/{job_name}`. + string job = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } + ]; +} + +// AutomationRolloutMetadata contains Automation-related actions that +// were performed on a rollout. +message AutomationRolloutMetadata { + // Output only. The ID of the AutomationRun initiated by a promote release + // rule. + string promote_automation_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by an advance rollout + // rule. + repeated string advance_automation_runs = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by a repair rollout + // rule. + repeated string repair_automation_runs = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Phase represents a collection of jobs that are logically grouped together +// for a `Rollout`. +message Phase { + // Valid states of a Phase. + enum State { + // The Phase has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The Phase is waiting for an earlier Phase(s) to complete. + PENDING = 1; + + // The Phase is in progress. + IN_PROGRESS = 2; + + // The Phase has succeeded. + SUCCEEDED = 3; + + // The Phase has failed. + FAILED = 4; + + // The Phase was aborted. + ABORTED = 5; + + // The Phase was skipped. + SKIPPED = 6; + } + + // Output only. The ID of the Phase. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the Phase. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information on why the Phase was skipped, if + // available. + string skip_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The job composition of this Phase. + oneof jobs { + // Output only. Deployment job composition. + DeploymentJobs deployment_jobs = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ChildRollout job composition. + ChildRolloutJobs child_rollout_jobs = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Deployment job composition. +message DeploymentJobs { + // Output only. The deploy Job. This is the deploy job in the phase. + Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The verify Job. Runs after a deploy if the deploy succeeds. + Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The predeploy Job, which is the first job on the phase. + Job predeploy_job = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The postdeploy Job, which is the last job on the phase. + Job postdeploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ChildRollouts job composition +message ChildRolloutJobs { + // Output only. List of CreateChildRolloutJobs + repeated Job create_rollout_jobs = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of AdvanceChildRolloutJobs + repeated Job advance_rollout_jobs = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Job represents an operation for a `Rollout`. +message Job { + // Valid states of a Job. + enum State { + // The Job has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The Job is waiting for an earlier Phase(s) or Job(s) to complete. + PENDING = 1; + + // The Job is disabled. + DISABLED = 2; + + // The Job is in progress. + IN_PROGRESS = 3; + + // The Job succeeded. + SUCCEEDED = 4; + + // The Job failed. + FAILED = 5; + + // The Job was aborted. + ABORTED = 6; + + // The Job was skipped. + SKIPPED = 7; + + // The Job was ignored. + IGNORED = 8; + } + + // Output only. The ID of the Job. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the Job. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information on why the Job was skipped, if + // available. + string skip_message = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the `JobRun` responsible for the most recent + // invocation of this Job. + string job_run = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; + + // The type of Job. + oneof job_type { + // Output only. A deploy Job. + DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A verify Job. + VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A predeploy Job. + PredeployJob predeploy_job = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A postdeploy Job. + PostdeployJob postdeploy_job = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A createChildRollout Job. + CreateChildRolloutJob create_child_rollout_job = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An advanceChildRollout Job. + AdvanceChildRolloutJob advance_child_rollout_job = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// A deploy Job. +message DeployJob {} + +// A verify Job. +message VerifyJob {} + +// A predeploy Job. +message PredeployJob { + // Output only. The custom actions that the predeploy Job executes. + repeated string actions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A postdeploy Job. +message PostdeployJob { + // Output only. The custom actions that the postdeploy Job executes. + repeated string actions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A createChildRollout Job. +message CreateChildRolloutJob {} + +// An advanceChildRollout Job. +message AdvanceChildRolloutJob {} + +// ListRolloutsRequest is the request object used by `ListRollouts`. +message ListRolloutsRequest { + // Required. The `Release` which owns this collection of `Rollout` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; + + // Optional. The maximum number of `Rollout` objects to return. The service + // may return fewer than this value. If unspecified, at most 50 `Rollout` + // objects will be returned. The maximum value is 1000; values above 1000 will + // be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListRollouts` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + // for more details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for + // more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListRolloutsResponse is the response object reutrned by `ListRollouts`. +message ListRolloutsResponse { + // The `Rollout` objects. + repeated Rollout rollouts = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetRolloutRequest is the request object used by `GetRollout`. +message GetRolloutRequest { + // Required. Name of the `Rollout`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; +} + +// CreateRolloutRequest is the request object used by `CreateRollout`. +message CreateRolloutRequest { + // Required. The parent collection in which the `Rollout` should be created. + // Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; + + // Required. ID of the `Rollout`. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Rollout` to create. + Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` + // will start at the first phase. + string starting_phase_id = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object used by `ApproveRollout`. +message ApproveRolloutRequest { + // Required. Name of the Rollout. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. True = approve; false = reject + bool approved = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from `ApproveRollout`. +message ApproveRolloutResponse {} + +// The request object used by `AdvanceRollout`. +message AdvanceRolloutRequest { + // Required. Name of the Rollout. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. The phase ID to advance the `Rollout` to. + string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from `AdvanceRollout`. +message AdvanceRolloutResponse {} + +// The request object used by `CancelRollout`. +message CancelRolloutRequest { + // Required. Name of the Rollout. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; +} + +// The response object from `CancelRollout`. +message CancelRolloutResponse {} + +// The request object used by `IgnoreJob`. +message IgnoreJobRequest { + // Required. Name of the Rollout. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + string rollout = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. The phase ID the Job to ignore belongs to. + string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The job ID for the Job to ignore. + string job_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from `IgnoreJob`. +message IgnoreJobResponse {} + +// RetryJobRequest is the request object used by `RetryJob`. +message RetryJobRequest { + // Required. Name of the Rollout. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + string rollout = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. The phase ID the Job to retry belongs to. + string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The job ID for the Job to retry. + string job_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from 'RetryJob'. +message RetryJobResponse {} + +// The request object used by `AbandonRelease`. +message AbandonReleaseRequest { + // Required. Name of the Release. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; +} + +// The response object for `AbandonRelease`. +message AbandonReleaseResponse {} + +// A `JobRun` resource in the Cloud Deploy API. +// +// A `JobRun` contains information of a single `Rollout` job evaluation. +message JobRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/JobRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}" + }; + + // Valid states of a `JobRun`. + enum State { + // The `JobRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `JobRun` is in progress. + IN_PROGRESS = 1; + + // The `JobRun` has succeeded. + SUCCEEDED = 2; + + // The `JobRun` has failed. + FAILED = 3; + + // The `JobRun` is terminating. + TERMINATING = 4; + + // The `JobRun` was terminated. + TERMINATED = 5; + } + + // Optional. Name of the `JobRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `JobRun`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the `Rollout` phase this `JobRun` belongs in. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the `Rollout` job this `JobRun` corresponds to. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` was started. + google.protobuf.Timestamp start_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` ended. + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the `JobRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The `JobRun` type and the information for that type. + oneof job_run { + // Output only. Information specific to a deploy `JobRun`. + DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to a verify `JobRun`. + VerifyJobRun verify_job_run = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to a predeploy `JobRun`. + PredeployJobRun predeploy_job_run = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to a postdeploy `JobRun`. + PostdeployJobRun postdeploy_job_run = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to a createChildRollout `JobRun`. + CreateChildRolloutJobRun create_child_rollout_job_run = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to an advanceChildRollout `JobRun` + AdvanceChildRolloutJobRun advance_child_rollout_job_run = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DeployJobRun contains information specific to a deploy `JobRun`. +message DeployJobRun { + // Well-known deploy failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Cloud Deploy has insufficient permissions. See [Required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The deploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The deploy job run did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // There were missing resources in the runtime environment required for a + // canary deployment. Check the Cloud Build logs for more information. + MISSING_RESOURCES_FOR_CANARY = 4; + + // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message + // for additional details. + CLOUD_BUILD_REQUEST_FAILED = 5; + } + + // Output only. The resource name of the Cloud Build `Build` object that is + // used to deploy. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. The reason the deploy failed. This will always be unspecified + // while the deploy is in progress or if it succeeded. + FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the deploy failure, if available. + string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata containing information about the deploy job run. + DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The artifact of a deploy job run, if available. + DeployArtifact artifact = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// VerifyJobRun contains information specific to a verify `JobRun`. +message VerifyJobRun { + // Well-known verify failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Cloud Deploy has insufficient permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The verify operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The verify job run did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // No Skaffold verify configuration was found. + VERIFICATION_CONFIG_NOT_FOUND = 4; + + // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message + // for additional details. + CLOUD_BUILD_REQUEST_FAILED = 5; + } + + // Output only. The resource name of the Cloud Build `Build` object that is + // used to verify. Format is + // `projects/{project}/locations/{location}/builds/{build}`. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. URI of a directory containing the verify artifacts. This + // contains the Skaffold event log. + string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the Skaffold event log relative to the artifact + // URI. + string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reason the verify failed. This will always be unspecified + // while the verify is in progress or if it succeeded. + FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the verify failure, if available. + string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// PredeployJobRun contains information specific to a predeploy `JobRun`. +message PredeployJobRun { + // Well-known predeploy failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Cloud Deploy has insufficient permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The predeploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The predeploy job run did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message + // for additional details. + CLOUD_BUILD_REQUEST_FAILED = 4; + } + + // Output only. The resource name of the Cloud Build `Build` object that is + // used to execute the custom actions associated with the predeploy Job. + // Format is `projects/{project}/locations/{location}/builds/{build}`. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. The reason the predeploy failed. This will always be + // unspecified while the predeploy is in progress or if it succeeded. + FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the predeploy failure, if + // available. + string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// PostdeployJobRun contains information specific to a postdeploy `JobRun`. +message PostdeployJobRun { + // Well-known postdeploy failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Cloud Deploy has insufficient permissions. See [required + // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The postdeploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The postdeploy job run did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message + // for additional details. + CLOUD_BUILD_REQUEST_FAILED = 4; + } + + // Output only. The resource name of the Cloud Build `Build` object that is + // used to execute the custom actions associated with the postdeploy Job. + // Format is `projects/{project}/locations/{location}/builds/{build}`. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. The reason the postdeploy failed. This will always be + // unspecified while the postdeploy is in progress or if it succeeded. + FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the postdeploy failure, if + // available. + string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CreateChildRolloutJobRun contains information specific to a +// createChildRollout `JobRun`. +message CreateChildRolloutJobRun { + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the childRollout Phase initiated by this JobRun. + string rollout_phase_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AdvanceChildRolloutJobRun contains information specific to a +// advanceChildRollout `JobRun`. +message AdvanceChildRolloutJobRun { + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. the ID of the ChildRollout's Phase. + string rollout_phase_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListJobRunsRequest is the request object used by `ListJobRuns`. +message ListJobRunsRequest { + // Required. The `Rollout` which owns this collection of `JobRun` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Optional. The maximum number of `JobRun` objects to return. The service may + // return fewer than this value. If unspecified, at most 50 `JobRun` objects + // will be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListJobRuns` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter results to be returned. See https://google.aip.dev/160 for + // more details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for + // more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListJobRunsResponse is the response object returned by `ListJobRuns`. +message ListJobRunsResponse { + // The `JobRun` objects. + repeated JobRun job_runs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. If + // this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached + repeated string unreachable = 3; +} + +// GetJobRunRequest is the request object used by `GetJobRun`. +message GetJobRunRequest { + // Required. Name of the `JobRun`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; +} + +// The request object used by `TerminateJobRun`. +message TerminateJobRunRequest { + // Required. Name of the `JobRun`. Format must be + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; +} + +// The response object from `TerminateJobRun`. +message TerminateJobRunResponse {} + +// Service-wide configuration. +message Config { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Config" + pattern: "projects/{project}/locations/{location}/config" + }; + + // Name of the configuration. + string name = 1; + + // All supported versions of Skaffold. + repeated SkaffoldVersion supported_versions = 2; + + // Default Skaffold version that is assigned when a Release is created without + // specifying a Skaffold version. + string default_skaffold_version = 3; +} + +// Details of a supported Skaffold version. +message SkaffoldVersion { + // Release version number. For example, "1.20.3". + string version = 1; + + // The time at which this version of skaffold will enter maintenance mode. + google.protobuf.Timestamp maintenance_mode_time = 3; + + // The time at which this version of skaffold will no longer be supported. + google.protobuf.Timestamp support_expiration_time = 4; + + // Date when this version is expected to no longer be supported. + google.type.Date support_end_date = 2; +} + +// Request to get a configuration. +message GetConfigRequest { + // Required. Name of requested configuration. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Config" + } + ]; +} + +// An `Automation` resource in the Cloud Deploy API. +// +// An `Automation` enables the automation of manually driven actions for +// a Delivery Pipeline, which includes Release promotion amongst Targets, +// Rollout repair and Rollout deployment strategy advancement. The intention +// of Automation is to reduce manual intervention in the continuous delivery +// process. +message Automation { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Automation" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}" + style: DECLARATIVE_FRIENDLY + }; + + // Output only. Name of the `Automation`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Automation`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Automation`. Max length is 255 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the automation was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automation was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User annotations. These attributes can only be set and used by + // the user, and not by Cloud Deploy. Annotations must meet the following + // constraints: + // + // * Annotations are key/value pairs. + // * Valid annotation keys have two segments: an optional prefix and name, + // separated by a slash (`/`). + // * The name segment is required and must be 63 characters or less, + // beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with + // dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between. + // * The prefix is optional. If specified, the prefix must be a DNS subdomain: + // a series of DNS labels separated by dots(`.`), not longer than 253 + // characters in total, followed by a slash (`/`). + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set + // for more details. + map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 63 characters. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the `Automation` resource. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When Suspended, automation is deactivated from execution. + bool suspended = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Email address of the user-managed IAM service account that + // creates Cloud Deploy release and rollout resources. + string service_account = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Selected resources to which the automation will be applied. + AutomationResourceSelector selector = 11 + [(google.api.field_behavior) = REQUIRED]; + + // Required. List of Automation rules associated with the Automation resource. + // Must have at least one rule and limited to 250 rules per Delivery Pipeline. + // Note: the order of the rules here is not the same as the order of + // execution. + repeated AutomationRule rules = 14 [(google.api.field_behavior) = REQUIRED]; +} + +// AutomationResourceSelector contains the information to select the resources +// to which an Automation is going to be applied. +message AutomationResourceSelector { + // Contains attributes about a target. + repeated TargetAttribute targets = 1; +} + +// `AutomationRule` defines the automation activities. +message AutomationRule { + // The configuration of the Automation rule. + oneof rule { + // Optional. `PromoteReleaseRule` will automatically promote a release from + // the current target to a specified target. + PromoteReleaseRule promote_release_rule = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `AdvanceRolloutRule` will automatically advance a + // successful Rollout. + AdvanceRolloutRule advance_rollout_rule = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `RepairRolloutRule` will automatically repair a failed + // rollout. + RepairRolloutRule repair_rollout_rule = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// `PromoteRelease` rule will automatically promote a release from the current +// target to a specified target. +message PromoteReleaseRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long the release need to be paused until being promoted to + // the next target. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the stage in the pipeline to which this `Release` is + // deploying. If unspecified, default it to the next stage in the promotion + // flow. The value of this field could be one of the following: + // * The last segment of a target name. It only needs the ID to determine + // if the target is one of the stages in the promotion sequence defined + // in the pipeline. + // * "@next", the next target in the promotion sequence. + string destination_target_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The starting phase of the rollout created by this operation. + // Default to the first phase. + string destination_phase = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `AdvanceRollout` automation rule will automatically advance a successful +// Rollout to the next phase. +message AdvanceRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proceeds only after phase name matched any one in the list. + // This value must consist of lower-case letters, numbers, and hyphens, + // start with a letter and end with a letter or a number, and have a max + // length of 63 characters. In other words, it must match the following + // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How long to wait after a rollout is finished. + google.protobuf.Duration wait = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The `RepairRolloutRule` automation rule will automatically repair a failed +// `Rollout`. +message RepairRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Phases within which jobs are subject to automatic repair actions + // on failure. Proceeds only after phase name matched any one in the list, or + // for all phases if unspecified. This value must consist of lower-case + // letters, numbers, and hyphens, start with a letter and end with a letter or + // a number, and have a max length of 63 characters. In other words, it must + // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Jobs to repair. Proceeds only after job name matched any one in + // the list, or for all jobs if unspecified or empty. The phase that includes + // the job must match the phase ID specified in `source_phase`. This value + // must consist of lower-case letters, numbers, and hyphens, start with a + // letter and end with a letter or a number, and have a max length of 63 + // characters. In other words, it must match the following regex: + // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string jobs = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Defines the types of automatic repair actions for failed jobs. + repeated RepairMode repair_modes = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Information around the state of the 'Automation' rule. + AutomationRuleCondition condition = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration of the repair action. +message RepairMode { + // The repair action to perform. + oneof mode { + // Optional. Retries a failed job. + Retry retry = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rolls back a `Rollout`. + Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Retries the failed job. +message Retry { + // Required. Total number of retries. Retry will skipped if set to 0; The + // minimum value is 1, and the maximum value is 10. + int64 attempts = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long to wait for the first retry. Default is 0, and the + // maximum value is 14d. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The pattern of how wait time will be increased. Default is + // linear. Backoff mode will be ignored if `wait` is 0. + BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Rolls back a `Rollout`. +message Rollback { + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// `AutomationRuleCondition` contains conditions relevant to an +// `Automation` rule. +message AutomationRuleCondition { + // Optional. Details around targets enumerated in the rule. + TargetsPresentCondition targets_present_condition = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `CreateAutomation`. +message CreateAutomationRequest { + // Required. The parent collection in which the `Automation` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Required. ID of the `Automation`. + string automation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to create. + Automation automation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateAutomation`. +message UpdateAutomationRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Automation` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to update. + Automation automation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Automation` that does not exist will + // result in the creation of a new `Automation`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteAutomation`. +message DeleteAutomationRequest { + // Required. The name of the `Automation` to delete. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `Automation` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and verify whether the resource + // exists, but do not actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the request. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `ListAutomations`. +message ListAutomationsRequest { + // Required. The parent, which owns this collection of automations. Format + // must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // The maximum number of automations to return. The service may return + // fewer than this value. If unspecified, at most 50 automations will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter automations to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomations`. +message ListAutomationsResponse { + // The `Automations` objects. + repeated Automation automations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetAutomation` +message GetAutomationRequest { + // Required. Name of the `Automation`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; +} + +// An `AutomationRun` resource in the Cloud Deploy API. +// +// An `AutomationRun` represents an automation execution instance of an +// automation rule. +message AutomationRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/AutomationRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}" + }; + + // Valid state of an `AutomationRun`. + enum State { + // The `AutomationRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `AutomationRun` has succeeded. + SUCCEEDED = 1; + + // The `AutomationRun` was cancelled. + CANCELLED = 2; + + // The `AutomationRun` has failed. + FAILED = 3; + + // The `AutomationRun` is in progress. + IN_PROGRESS = 4; + + // The `AutomationRun` is pending. + PENDING = 5; + } + + // Output only. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `AutomationRun` was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automationRun was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The weak etag of the `AutomationRun` resource. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user-managed IAM service account that + // performs the operations against Cloud Deploy resources. + string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the Automation taken at AutomationRun creation + // time. + Automation automation_snapshot = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the target that represents the promotion stage that + // initiates the `AutomationRun`. The value of this field is the last segment + // of a target name. + string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `AutomationRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explains the current state of the `AutomationRun`. Present + // only an explanation is needed. + string state_description = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the `AutomationRun` will expire. An `AutomationRun` will + // expire after 14 days from its creation date. + google.protobuf.Timestamp expire_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation rule that initiated the operation. + string rule_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation that initiated the operation. + string automation_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The operation that the `AutomationRun` will perform. + oneof operation { + // Output only. Promotes a release to a specified 'Target'. + PromoteReleaseOperation promote_release_operation = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Advances a rollout to the next phase. + AdvanceRolloutOperation advance_rollout_operation = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Repairs a failed 'Rollout'. + RepairRolloutOperation repair_rollout_operation = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Earliest time the `AutomationRun` will attempt to resume. + // Wait-time is configured by `wait` in automation rule. + google.protobuf.Timestamp wait_until_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated promote-release operation. +message PromoteReleaseOperation { + // Output only. The ID of the target that represents the promotion stage to + // which the release will be promoted. The value of this field is the last + // segment of a target name. + string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The starting phase of the rollout created by this operation. + string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated advance-rollout operation. +message AdvanceRolloutOperation { + // Output only. The phase of a deployment that initiated the operation. + string source_phase = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase to which the rollout will be advanced to. + string destination_phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information for an automated `repair rollout` operation. +message RepairRolloutOperation { + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The index of the current repair action in the repair sequence. + int64 current_repair_mode_index = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Records of the repair attempts. Each repair phase may have + // multiple retry attempts or single rollback attempt. + repeated RepairPhase repair_phases = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RepairPhase tracks the repair attempts that have been made for +// each `RepairMode` specified in the `Automation` resource. +message RepairPhase { + oneof repair_phase { + // Output only. Records of the retry attempts for retry repair mode. + RetryPhase retry = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Rollback attempt for rollback repair mode . + RollbackAttempt rollback = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// RetryPhase contains the retry attempts and the metadata for initiating a +// new attempt. +message RetryPhase { + // Output only. The number of attempts that have been made. + int64 total_attempts = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pattern of how the wait time of the retry attempt is + // calculated. + BackoffMode backoff_mode = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase ID of the phase that includes the job being retried. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The job ID for the Job to retry. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detail of a retry action. + repeated RetryAttempt attempts = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RetryAttempt represents an action of retrying the failed Cloud Deploy job. +message RetryAttempt { + // Output only. The index of this retry attempt. + int64 attempt = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this retry action. + RepairState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Retry. + string state_desc = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'. +message RollbackAttempt { + // Output only. The phase to which the rollout will be rolled back to. + string destination_phase = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the rollback `Rollout` to create. + string rollout_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this rollback action. + RepairState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Rollback. + string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListAutomationRuns`. +message ListAutomationRunsRequest { + // Required. The parent, which owns this collection of automationRuns. Format + // must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; + + // The maximum number of automationRuns to return. The service may return + // fewer than this value. If unspecified, at most 50 automationRuns will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomationRuns` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter automationRuns to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomationRuns`. +message ListAutomationRunsResponse { + // The `AutomationRuns` objects. + repeated AutomationRun automation_runs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetAutomationRun` +message GetAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The request object used by `CancelAutomationRun`. +message CancelAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The response object from `CancelAutomationRun`. +message CancelAutomationRunResponse {} + +// The support state of a specific Skaffold version. +enum SkaffoldSupportState { + // Default value. This value is unused. + SKAFFOLD_SUPPORT_STATE_UNSPECIFIED = 0; + + // This skaffold version is currently supported. + SKAFFOLD_SUPPORT_STATE_SUPPORTED = 1; + + // This skaffold version is in maintenance mode. + SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE = 2; + + // This skaffold version is no longer supported. + SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3; +} + +// The pattern of how wait time is increased. +enum BackoffMode { + // No WaitMode is specified. + BACKOFF_MODE_UNSPECIFIED = 0; + + // Increases the wait time linearly. + BACKOFF_MODE_LINEAR = 1; + + // Increases the wait time exponentially. + BACKOFF_MODE_EXPONENTIAL = 2; +} + +// Valid state of a repair attempt. +enum RepairState { + // The `repair` has an unspecified state. + REPAIR_STATE_UNSPECIFIED = 0; + + // The `repair` action has succeeded. + REPAIR_STATE_SUCCEEDED = 1; + + // The `repair` action was cancelled. + REPAIR_STATE_CANCELLED = 2; + + // The `repair` action has failed. + REPAIR_STATE_FAILED = 3; + + // The `repair` action is in progress. + REPAIR_STATE_IN_PROGRESS = 4; + + // The `repair` action is pending. + REPAIR_STATE_PENDING = 5; + + // The `repair` action was skipped. + REPAIR_STATE_SKIPPED = 6; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto new file mode 100644 index 00000000000..1b110254216 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "DeliveryPipelineNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/deliverypipeline_notification" +// Platform Log event that describes the failure to send delivery pipeline +// status change Pub/Sub notification. +message DeliveryPipelineNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `Delivery Pipeline`. + string delivery_pipeline = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto new file mode 100644 index 00000000000..5e4392467f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto @@ -0,0 +1,50 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "JobRunNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/jobrun_notification" +// Platform Log event that describes the failure to send JobRun resource update +// Pub/Sub notification. +message JobRunNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `JobRun`. + string job_run = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Unique identifier of the `Release`. + string release_uid = 4; + + // Unique identifier of the `Rollout`. + string rollout_uid = 5; + + // ID of the `Target`. + string target_id = 6; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 7; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto new file mode 100644 index 00000000000..ab9dcb20913 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto @@ -0,0 +1,49 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "LogEnumsProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Type indicates the type of the log entry and can be used as a filter. +enum Type { + // Type is unspecified. + TYPE_UNSPECIFIED = 0; + + // A Pub/Sub notification failed to be sent. + TYPE_PUBSUB_NOTIFICATION_FAILURE = 1; + + // Resource state changed. + TYPE_RESOURCE_STATE_CHANGE = 3; + + // A process aborted. + TYPE_PROCESS_ABORTED = 4; + + // Restriction check failed. + TYPE_RESTRICTION_VIOLATED = 5; + + // Resource deleted. + TYPE_RESOURCE_DELETED = 6; + + // Rollout updated. + TYPE_ROLLOUT_UPDATE = 7; + + // Deprecated: This field is never used. Use release_render log type instead. + TYPE_RENDER_STATUES_CHANGE = 2 [deprecated = true]; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto new file mode 100644 index 00000000000..6e0eb0d88bc --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "ReleaseNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/release_notification" +// Platform Log event that describes the failure to send release status change +// Pub/Sub notification. +message ReleaseNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `Release`. + string release = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto new file mode 100644 index 00000000000..0329689960a --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/cloud_deploy.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "ReleaseRenderPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/release_render" +// Platform Log event that describes the render status change. +message ReleaseRenderEvent { + // Debug message for when a render transition occurs. Provides further + // details as rendering progresses through render states. + string message = 1; + + // The name of the release. + string release = 2; + + // The state of the release render. + Release.RenderState release_render_state = 3; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto new file mode 100644 index 00000000000..1aa3b687ab0 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto @@ -0,0 +1,47 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "RolloutNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/rollout_notification" +// Platform Log event that describes the failure to send rollout status change +// Pub/Sub notification. +message RolloutNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 2; + + // Unique identifier of the `Release`. + string release_uid = 3; + + // The name of the `Rollout`. + string rollout = 4; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 5; + + // ID of the `Target` that the rollout is deployed to. + string target_id = 6; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_update_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_update_payload.proto new file mode 100644 index 00000000000..5da1f453375 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_update_payload.proto @@ -0,0 +1,94 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "RolloutUpdatePayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/rollout_update" +// Platform Log event that describes the rollout update event. +message RolloutUpdateEvent { + // RolloutUpdateType indicates the type of the rollout update. + enum RolloutUpdateType { + // Rollout update type unspecified. + ROLLOUT_UPDATE_TYPE_UNSPECIFIED = 0; + + // rollout state updated to pending. + PENDING = 1; + + // Rollout state updated to pending release. + PENDING_RELEASE = 2; + + // Rollout state updated to in progress. + IN_PROGRESS = 3; + + // Rollout state updated to cancelling. + CANCELLING = 4; + + // Rollout state updated to cancelled. + CANCELLED = 5; + + // Rollout state updated to halted. + HALTED = 6; + + // Rollout state updated to succeeded. + SUCCEEDED = 7; + + // Rollout state updated to failed. + FAILED = 8; + + // Rollout requires approval. + APPROVAL_REQUIRED = 9; + + // Rollout has been approved. + APPROVED = 10; + + // Rollout has been rejected. + REJECTED = 11; + + // Rollout requires advance to the next phase. + ADVANCE_REQUIRED = 12; + + // Rollout has been advanced. + ADVANCED = 13; + } + + // Unique identifier of the pipeline. + string pipeline_uid = 1; + + // Unique identifier of the release. + string release_uid = 2; + + // The name of the rollout. + string rollout = 3; + + // ID of the target. + string target_id = 4; + + // The type of the rollout update. + RolloutUpdateType rollout_update_type = 5; + + // Debug message for when a rollout update event occurs. + string message = 6; + + // Type of this notification, e.g. for a rollout update event. + Type type = 7; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto new file mode 100644 index 00000000000..d38df104c3c --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto @@ -0,0 +1,38 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "TargetNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/target_notification" +// Platform Log event that describes the failure to send target status change +// Pub/Sub notification. +message TargetNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `Target`. + string target = 2; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 3; +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js new file mode 100644 index 00000000000..cb791ed4624 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Release. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callAbandonRelease() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.abandonRelease(request); + console.log(response); + } + + callAbandonRelease(); + // [END clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js new file mode 100644 index 00000000000..fcb09cd794f --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, phaseId) { + // [START clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + */ + // const name = 'abc123' + /** + * Required. The phase ID to advance the `Rollout` to. + */ + // const phaseId = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callAdvanceRollout() { + // Construct request + const request = { + name, + phaseId, + }; + + // Run request + const response = await deployClient.advanceRollout(request); + console.log(response); + } + + callAdvanceRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js new file mode 100644 index 00000000000..fa9cefda477 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -0,0 +1,67 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, approved) { + // [START clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + */ + // const name = 'abc123' + /** + * Required. True = approve; false = reject + */ + // const approved = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callApproveRollout() { + // Construct request + const request = { + name, + approved, + }; + + // Run request + const response = await deployClient.approveRollout(request); + console.log(response); + } + + callApproveRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_automation_run.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_automation_run.js new file mode 100644 index 00000000000..557b600bfb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_automation_run.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `AutomationRun`. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCancelAutomationRun() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.cancelAutomationRun(request); + console.log(response); + } + + callCancelAutomationRun(); + // [END clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js new file mode 100644 index 00000000000..508ca9e2c60 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_CancelRollout_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCancelRollout() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.cancelRollout(request); + console.log(response); + } + + callCancelRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_CancelRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_automation.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_automation.js new file mode 100644 index 00000000000..cf81f080f4c --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_automation.js @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, automationId, automation) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Automation` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Automation`. + */ + // const automationId = 'abc123' + /** + * Required. The `Automation` to create. + */ + // const automation = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCreateAutomation() { + // Construct request + const request = { + parent, + automationId, + automation, + }; + + // Run request + const [operation] = await deployClient.createAutomation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAutomation(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js new file mode 100644 index 00000000000..bc35269a796 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, deliveryPipelineId, deliveryPipeline) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `DeliveryPipeline` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}`. + */ + // const parent = 'abc123' + /** + * Required. ID of the `DeliveryPipeline`. + */ + // const deliveryPipelineId = 'abc123' + /** + * Required. The `DeliveryPipeline` to create. + */ + // const deliveryPipeline = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCreateDeliveryPipeline() { + // Construct request + const request = { + parent, + deliveryPipelineId, + deliveryPipeline, + }; + + // Run request + const [operation] = await deployClient.createDeliveryPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js new file mode 100644 index 00000000000..029f3c779c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, releaseId, release) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Release` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Release`. + */ + // const releaseId = 'abc123' + /** + * Required. The `Release` to create. + */ + // const release = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCreateRelease() { + // Construct request + const request = { + parent, + releaseId, + release, + }; + + // Run request + const [operation] = await deployClient.createRelease(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateRelease(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js new file mode 100644 index 00000000000..6a19b19f0e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js @@ -0,0 +1,98 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, rolloutId, rollout) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Rollout` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Rollout`. + */ + // const rolloutId = 'abc123' + /** + * Required. The `Rollout` to create. + */ + // const rollout = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + /** + * Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` + * will start at the first phase. + */ + // const startingPhaseId = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCreateRollout() { + // Construct request + const request = { + parent, + rolloutId, + rollout, + }; + + // Run request + const [operation] = await deployClient.createRollout(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js new file mode 100644 index 00000000000..8b9301f42df --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, targetId, target) { + // [START clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which the `Target` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}`. + */ + // const parent = 'abc123' + /** + * Required. ID of the `Target`. + */ + // const targetId = 'abc123' + /** + * Required. The `Target` to create. + */ + // const target = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callCreateTarget() { + // Construct request + const request = { + parent, + targetId, + target, + }; + + // Run request + const [operation] = await deployClient.createTarget(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_automation.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_automation.js new file mode 100644 index 00000000000..34200666f9c --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_automation.js @@ -0,0 +1,94 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `Automation` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + */ + // const name = 'abc123' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * `Automation` will succeed. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and verify whether the resource + * exists, but do not actually post it. + */ + // const validateOnly = true + /** + * Optional. The weak etag of the request. + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + */ + // const etag = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callDeleteAutomation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await deployClient.deleteAutomation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAutomation(); + // [END clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js new file mode 100644 index 00000000000..393e2c5f5f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -0,0 +1,99 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `DeliveryPipeline` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + */ + // const name = 'abc123' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeliveryPipeline` will succeed. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * actually post it. + */ + // const validateOnly = true + /** + * Optional. If set to true, all child resources under this pipeline will also + * be deleted. Otherwise, the request will only work if the pipeline has no + * child resources. + */ + // const force = true + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + */ + // const etag = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callDeleteDeliveryPipeline() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await deployClient.deleteDeliveryPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js new file mode 100644 index 00000000000..ebe1b0cd306 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `Target` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + */ + // const name = 'abc123' + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, then deleting an already deleted or non-existing + * `Target` will succeed. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * actually post it. + */ + // const validateOnly = true + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + */ + // const etag = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callDeleteTarget() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await deployClient.deleteTarget(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation.js new file mode 100644 index 00000000000..57e0fd66e66 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetAutomation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Automation`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetAutomation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getAutomation(request); + console.log(response); + } + + callGetAutomation(); + // [END clouddeploy_v1_generated_CloudDeploy_GetAutomation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation_run.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation_run.js new file mode 100644 index 00000000000..d1cabd81a9f --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation_run.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `AutomationRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetAutomationRun() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getAutomationRun(request); + console.log(response); + } + + callGetAutomationRun(); + // [END clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js new file mode 100644 index 00000000000..bd84d495150 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of requested configuration. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getConfig(request); + console.log(response); + } + + callGetConfig(); + // [END clouddeploy_v1_generated_CloudDeploy_GetConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js new file mode 100644 index 00000000000..630419ae016 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `DeliveryPipeline`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetDeliveryPipeline() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getDeliveryPipeline(request); + console.log(response); + } + + callGetDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js new file mode 100644 index 00000000000..ffb17d2e3d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetJobRun_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `JobRun`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetJobRun() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getJobRun(request); + console.log(response); + } + + callGetJobRun(); + // [END clouddeploy_v1_generated_CloudDeploy_GetJobRun_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js new file mode 100644 index 00000000000..b005ec93c94 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetRelease_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Release`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetRelease() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getRelease(request); + console.log(response); + } + + callGetRelease(); + // [END clouddeploy_v1_generated_CloudDeploy_GetRelease_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js new file mode 100644 index 00000000000..37c79053a1c --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetRollout_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Rollout`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetRollout() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getRollout(request); + console.log(response); + } + + callGetRollout(); + // [END clouddeploy_v1_generated_CloudDeploy_GetRollout_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js new file mode 100644 index 00000000000..89aa9d69099 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_GetTarget_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `Target`. Format must be + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callGetTarget() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.getTarget(request); + console.log(response); + } + + callGetTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_GetTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js new file mode 100644 index 00000000000..293719eacfc --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rollout, phaseId, jobId) { + // [START clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + */ + // const rollout = 'abc123' + /** + * Required. The phase ID the Job to ignore belongs to. + */ + // const phaseId = 'abc123' + /** + * Required. The job ID for the Job to ignore. + */ + // const jobId = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callIgnoreJob() { + // Construct request + const request = { + rollout, + phaseId, + jobId, + }; + + // Run request + const response = await deployClient.ignoreJob(request); + console.log(response); + } + + callIgnoreJob(); + // [END clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automation_runs.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automation_runs.js new file mode 100644 index 00000000000..a80da454153 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automation_runs.js @@ -0,0 +1,88 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + */ + // const parent = 'abc123' + /** + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAutomationRuns` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Filter automationRuns to be returned. All fields can be used in the + * filter. + */ + // const filter = 'abc123' + /** + * Field to sort by. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListAutomationRuns() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listAutomationRunsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAutomationRuns(); + // [END clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automations.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automations.js new file mode 100644 index 00000000000..3f12b91f056 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automations.js @@ -0,0 +1,88 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListAutomations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + */ + // const parent = 'abc123' + /** + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAutomations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Filter automations to be returned. All fields can be used in the + * filter. + */ + // const filter = 'abc123' + /** + * Field to sort by. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListAutomations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listAutomationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAutomations(); + // [END clouddeploy_v1_generated_CloudDeploy_ListAutomations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js new file mode 100644 index 00000000000..1aa20694935 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + */ + // const parent = 'abc123' + /** + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + */ + // const filter = 'abc123' + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListDeliveryPipelines() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listDeliveryPipelinesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDeliveryPipelines(); + // [END clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js new file mode 100644 index 00000000000..d09b36df445 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `Rollout` which owns this collection of `JobRun` objects. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListJobRuns` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListJobRuns() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listJobRunsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListJobRuns(); + // [END clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js new file mode 100644 index 00000000000..8efacd4044c --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js @@ -0,0 +1,88 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListReleases_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `DeliveryPipeline` which owns this collection of `Release` + * objects. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListReleases() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listReleasesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReleases(); + // [END clouddeploy_v1_generated_CloudDeploy_ListReleases_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js new file mode 100644 index 00000000000..77ba2a156b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js @@ -0,0 +1,87 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `Release` which owns this collection of `Rollout` objects. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListRollouts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listRolloutsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListRollouts(); + // [END clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js new file mode 100644 index 00000000000..e09c307fcfc --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js @@ -0,0 +1,88 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START clouddeploy_v1_generated_CloudDeploy_ListTargets_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other provided parameters match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + */ + // const filter = 'abc123' + /** + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + */ + // const orderBy = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callListTargets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await deployClient.listTargetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTargets(); + // [END clouddeploy_v1_generated_CloudDeploy_ListTargets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js new file mode 100644 index 00000000000..c87a3d0d591 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js @@ -0,0 +1,72 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rollout, phaseId, jobId) { + // [START clouddeploy_v1_generated_CloudDeploy_RetryJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + */ + // const rollout = 'abc123' + /** + * Required. The phase ID the Job to retry belongs to. + */ + // const phaseId = 'abc123' + /** + * Required. The job ID for the Job to retry. + */ + // const jobId = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callRetryJob() { + // Construct request + const request = { + rollout, + phaseId, + jobId, + }; + + // Run request + const response = await deployClient.retryJob(request); + console.log(response); + } + + callRetryJob(); + // [END clouddeploy_v1_generated_CloudDeploy_RetryJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.rollback_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.rollback_target.js new file mode 100644 index 00000000000..d6834dd04ce --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.rollback_target.js @@ -0,0 +1,93 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, targetId, rolloutId) { + // [START clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + */ + // const name = 'abc123' + /** + * Required. ID of the `Target` that is being rolled back. + */ + // const targetId = 'abc123' + /** + * Required. ID of the rollback `Rollout` to create. + */ + // const rolloutId = 'abc123' + /** + * Optional. ID of the `Release` to roll back to. If this isn't specified, the + * previous successful `Rollout` to the specified target will be used to + * determine the `Release`. + */ + // const releaseId = 'abc123' + /** + * Optional. If provided, this must be the latest `Rollout` that is on the + * `Target`. + */ + // const rolloutToRollBack = 'abc123' + /** + * Optional. Configs for the rollback `Rollout`. + */ + // const rollbackConfig = {} + /** + * Optional. If set to true, the request is validated and the user is provided + * with a `RollbackTargetResponse`. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callRollbackTarget() { + // Construct request + const request = { + name, + targetId, + rolloutId, + }; + + // Run request + const response = await deployClient.rollbackTarget(request); + console.log(response); + } + + callRollbackTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js new file mode 100644 index 00000000000..3158a5f54ac --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js @@ -0,0 +1,62 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the `JobRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. + */ + // const name = 'abc123' + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callTerminateJobRun() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await deployClient.terminateJobRun(request); + console.log(response); + } + + callTerminateJobRun(); + // [END clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_automation.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_automation.js new file mode 100644 index 00000000000..bfdeac5e3c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_automation.js @@ -0,0 +1,95 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, automation) { + // [START clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Automation` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The `Automation` to update. + */ + // const automation = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, updating a `Automation` that does not exist will + * result in the creation of a new `Automation`. + */ + // const allowMissing = true + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callUpdateAutomation() { + // Construct request + const request = { + updateMask, + automation, + }; + + // Run request + const [operation] = await deployClient.updateAutomation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAutomation(); + // [END clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js new file mode 100644 index 00000000000..131f075e6dd --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js @@ -0,0 +1,95 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, deliveryPipeline) { + // [START clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `DeliveryPipeline` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The `DeliveryPipeline` to update. + */ + // const deliveryPipeline = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, updating a `DeliveryPipeline` that does not exist + * will result in the creation of a new `DeliveryPipeline`. + */ + // const allowMissing = true + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callUpdateDeliveryPipeline() { + // Construct request + const request = { + updateMask, + deliveryPipeline, + }; + + // Run request + const [operation] = await deployClient.updateDeliveryPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDeliveryPipeline(); + // [END clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js new file mode 100644 index 00000000000..c53850189bb --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js @@ -0,0 +1,95 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, target) { + // [START clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Target resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The `Target` to update. + */ + // const target = {} + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, updating a `Target` that does not exist will + * result in the creation of a new `Target`. + */ + // const allowMissing = true + /** + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + */ + // const validateOnly = true + + // Imports the Deploy library + const {CloudDeployClient} = require('@google-cloud/deploy').v1; + + // Instantiates a client + const deployClient = new CloudDeployClient(); + + async function callUpdateTarget() { + // Construct request + const request = { + updateMask, + target, + }; + + // Run request + const [operation] = await deployClient.updateTarget(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateTarget(); + // [END clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json new file mode 100644 index 00000000000..bd2a8cff8e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json @@ -0,0 +1,1759 @@ +{ + "clientLibrary": { + "name": "nodejs-deploy", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.deploy.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async", + "title": "CloudDeploy listDeliveryPipelines Sample", + "origin": "API_DEFINITION", + "description": " Lists DeliveryPipelines in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_delivery_pipelines.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeliveryPipelines", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListDeliveryPipelinesResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListDeliveryPipelines", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async", + "title": "CloudDeploy getDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.get_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.DeliveryPipeline", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async", + "title": "CloudDeploy createDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Creates a new DeliveryPipeline in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "delivery_pipeline_id", + "type": "TYPE_STRING" + }, + { + "name": "delivery_pipeline", + "type": ".google.cloud.deploy.v1.DeliveryPipeline" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async", + "title": "CloudDeploy updateDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.update_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "delivery_pipeline", + "type": ".google.cloud.deploy.v1.DeliveryPipeline" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async", + "title": "CloudDeploy deleteDeliveryPipeline Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single DeliveryPipeline.", + "canonical": true, + "file": "cloud_deploy.delete_delivery_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 91, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteDeliveryPipeline", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListTargets_async", + "title": "CloudDeploy listTargets Sample", + "origin": "API_DEFINITION", + "description": " Lists Targets in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_targets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTargets", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListTargetsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListTargets", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async", + "title": "CloudDeploy rollbackTarget Sample", + "origin": "API_DEFINITION", + "description": " Creates a `Rollout` to roll back the specified target.", + "canonical": true, + "file": "cloud_deploy.rollback_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "target_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + }, + { + "name": "release_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout_to_roll_back", + "type": "TYPE_STRING" + }, + { + "name": "rollback_config", + "type": ".google.cloud.deploy.v1.RollbackTargetConfig" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.deploy.v1.RollbackTargetResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "RollbackTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetTarget_async", + "title": "CloudDeploy getTarget Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Target.", + "canonical": true, + "file": "cloud_deploy.get_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Target", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateTarget_async", + "title": "CloudDeploy createTarget Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Target in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "target_id", + "type": "TYPE_STRING" + }, + { + "name": "target", + "type": ".google.cloud.deploy.v1.Target" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async", + "title": "CloudDeploy updateTarget Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Target.", + "canonical": true, + "file": "cloud_deploy.update_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "target", + "type": ".google.cloud.deploy.v1.Target" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async", + "title": "CloudDeploy deleteTarget Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Target.", + "canonical": true, + "file": "cloud_deploy.delete_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListReleases_async", + "title": "CloudDeploy listReleases Sample", + "origin": "API_DEFINITION", + "description": " Lists Releases in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_releases.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReleases", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListReleasesResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListReleases", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRelease_async", + "title": "CloudDeploy getRelease Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Release.", + "canonical": true, + "file": "cloud_deploy.get_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Release", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRelease_async", + "title": "CloudDeploy createRelease Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Release in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "release_id", + "type": "TYPE_STRING" + }, + { + "name": "release", + "type": ".google.cloud.deploy.v1.Release" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async", + "title": "CloudDeploy abandonRelease Sample", + "origin": "API_DEFINITION", + "description": " Abandons a Release in the Delivery Pipeline.", + "canonical": true, + "file": "cloud_deploy.abandon_release.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AbandonRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.AbandonRelease", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.AbandonReleaseResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "AbandonRelease", + "fullName": "google.cloud.deploy.v1.CloudDeploy.AbandonRelease", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async", + "title": "CloudDeploy approveRollout Sample", + "origin": "API_DEFINITION", + "description": " Approves a Rollout.", + "canonical": true, + "file": "cloud_deploy.approve_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApproveRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "approved", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.deploy.v1.ApproveRolloutResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ApproveRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async", + "title": "CloudDeploy advanceRollout Sample", + "origin": "API_DEFINITION", + "description": " Advances a Rollout in a given project and location.", + "canonical": true, + "file": "cloud_deploy.advance_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AdvanceRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.AdvanceRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "phase_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.AdvanceRolloutResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "AdvanceRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.AdvanceRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CancelRollout_async", + "title": "CloudDeploy cancelRollout Sample", + "origin": "API_DEFINITION", + "description": " Cancels a Rollout in a given project and location.", + "canonical": true, + "file": "cloud_deploy.cancel_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.CancelRolloutResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CancelRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListRollouts_async", + "title": "CloudDeploy listRollouts Sample", + "origin": "API_DEFINITION", + "description": " Lists Rollouts in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_rollouts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListRollouts", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListRolloutsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListRollouts", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRollout_async", + "title": "CloudDeploy getRollout Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Rollout.", + "canonical": true, + "file": "cloud_deploy.get_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Rollout", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRollout_async", + "title": "CloudDeploy createRollout Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Rollout in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_rollout.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout", + "type": ".google.cloud.deploy.v1.Rollout" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "starting_phase_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateRollout", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async", + "title": "CloudDeploy ignoreJob Sample", + "origin": "API_DEFINITION", + "description": " Ignores the specified Job in a Rollout.", + "canonical": true, + "file": "cloud_deploy.ignore_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "IgnoreJob", + "fullName": "google.cloud.deploy.v1.CloudDeploy.IgnoreJob", + "async": true, + "parameters": [ + { + "name": "rollout", + "type": "TYPE_STRING" + }, + { + "name": "phase_id", + "type": "TYPE_STRING" + }, + { + "name": "job_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.IgnoreJobResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "IgnoreJob", + "fullName": "google.cloud.deploy.v1.CloudDeploy.IgnoreJob", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_RetryJob_async", + "title": "CloudDeploy retryJob Sample", + "origin": "API_DEFINITION", + "description": " Retries the specified Job in a Rollout.", + "canonical": true, + "file": "cloud_deploy.retry_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetryJob", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RetryJob", + "async": true, + "parameters": [ + { + "name": "rollout", + "type": "TYPE_STRING" + }, + { + "name": "phase_id", + "type": "TYPE_STRING" + }, + { + "name": "job_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.RetryJobResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "RetryJob", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RetryJob", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async", + "title": "CloudDeploy listJobRuns Sample", + "origin": "API_DEFINITION", + "description": " Lists JobRuns in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_job_runs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListJobRuns", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListJobRunsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListJobRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListJobRuns", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetJobRun_async", + "title": "CloudDeploy getJobRun Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single JobRun.", + "canonical": true, + "file": "cloud_deploy.get_job_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJobRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetJobRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.JobRun", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetJobRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetJobRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async", + "title": "CloudDeploy terminateJobRun Sample", + "origin": "API_DEFINITION", + "description": " Terminates a Job Run in a given project and location.", + "canonical": true, + "file": "cloud_deploy.terminate_job_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TerminateJobRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.TerminateJobRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.TerminateJobRunResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "TerminateJobRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.TerminateJobRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetConfig_async", + "title": "CloudDeploy getConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets the configuration for a location.", + "canonical": true, + "file": "cloud_deploy.get_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConfig", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Config", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetConfig", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async", + "title": "CloudDeploy createAutomation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Automation in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "automation_id", + "type": "TYPE_STRING" + }, + { + "name": "automation", + "type": ".google.cloud.deploy.v1.Automation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async", + "title": "CloudDeploy updateAutomation Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Automation resource.", + "canonical": true, + "file": "cloud_deploy.update_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "automation", + "type": ".google.cloud.deploy.v1.Automation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async", + "title": "CloudDeploy deleteAutomation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Automation resource.", + "canonical": true, + "file": "cloud_deploy.delete_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetAutomation_async", + "title": "CloudDeploy getAutomation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Automation.", + "canonical": true, + "file": "cloud_deploy.get_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Automation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListAutomations_async", + "title": "CloudDeploy listAutomations Sample", + "origin": "API_DEFINITION", + "description": " Lists Automations in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_automations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAutomations", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListAutomationsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListAutomations", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async", + "title": "CloudDeploy getAutomationRun Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single AutomationRun.", + "canonical": true, + "file": "cloud_deploy.get_automation_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.AutomationRun", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async", + "title": "CloudDeploy listAutomationRuns Sample", + "origin": "API_DEFINITION", + "description": " Lists AutomationRuns in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_automation_runs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAutomationRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListAutomationRunsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListAutomationRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async", + "title": "CloudDeploy cancelAutomationRun Sample", + "origin": "API_DEFINITION", + "description": " Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun in a different state returns an `FAILED_PRECONDITION` error.", + "canonical": true, + "file": "cloud_deploy.cancel_automation_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.CancelAutomationRunResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CancelAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/index.ts b/owl-bot-staging/google-cloud-deploy/v1/src/index.ts new file mode 100644 index 00000000000..dbeccc4a958 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +const CloudDeployClient = v1.CloudDeployClient; +type CloudDeployClient = v1.CloudDeployClient; +export {v1, CloudDeployClient}; +export default {v1, CloudDeployClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts new file mode 100644 index 00000000000..190767619de --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts @@ -0,0 +1,5703 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/cloud_deploy_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './cloud_deploy_client_config.json'; +const version = require('../../../package.json').version; + +/** + * CloudDeploy service creates and manages Continuous Delivery operations + * on Google Cloud Platform via Skaffold (https://skaffold.dev). + * @class + * @memberof v1 + */ +export class CloudDeployClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + cloudDeployStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CloudDeployClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new CloudDeployClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CloudDeployClient; + const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + automationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}' + ), + automationRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}' + ), + buildPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/builds/{build}' + ), + clusterPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/clusters/{cluster}' + ), + configPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/config' + ), + deliveryPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobs/{job}' + ), + jobRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + membershipPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/memberships/{membership}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + releasePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}' + ), + rolloutPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}' + ), + servicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/services/{service}' + ), + targetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/targets/{target}' + ), + workerPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workerPools/{worker_pool}' + ), + }; + + // 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 = { + listDeliveryPipelines: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deliveryPipelines'), + listTargets: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targets'), + listReleases: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'releases'), + listRollouts: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rollouts'), + listJobRuns: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobRuns'), + listAutomations: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'automations'), + listAutomationRuns: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'automationRuns') + }; + + 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) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/targets/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/targets/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/targets/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createDeliveryPipelineResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.DeliveryPipeline') as gax.protobuf.Type; + const createDeliveryPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const updateDeliveryPipelineResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.DeliveryPipeline') as gax.protobuf.Type; + const updateDeliveryPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const deleteDeliveryPipelineResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteDeliveryPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const createTargetResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Target') as gax.protobuf.Type; + const createTargetMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const updateTargetResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Target') as gax.protobuf.Type; + const updateTargetMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const deleteTargetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteTargetMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const createReleaseResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Release') as gax.protobuf.Type; + const createReleaseMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const createRolloutResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Rollout') as gax.protobuf.Type; + const createRolloutMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const createAutomationResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Automation') as gax.protobuf.Type; + const createAutomationMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const updateAutomationResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Automation') as gax.protobuf.Type; + const updateAutomationMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + const deleteAutomationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteAutomationMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDeliveryPipelineResponse.decode.bind(createDeliveryPipelineResponse), + createDeliveryPipelineMetadata.decode.bind(createDeliveryPipelineMetadata)), + updateDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDeliveryPipelineResponse.decode.bind(updateDeliveryPipelineResponse), + updateDeliveryPipelineMetadata.decode.bind(updateDeliveryPipelineMetadata)), + deleteDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDeliveryPipelineResponse.decode.bind(deleteDeliveryPipelineResponse), + deleteDeliveryPipelineMetadata.decode.bind(deleteDeliveryPipelineMetadata)), + createTarget: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTargetResponse.decode.bind(createTargetResponse), + createTargetMetadata.decode.bind(createTargetMetadata)), + updateTarget: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateTargetResponse.decode.bind(updateTargetResponse), + updateTargetMetadata.decode.bind(updateTargetMetadata)), + deleteTarget: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteTargetResponse.decode.bind(deleteTargetResponse), + deleteTargetMetadata.decode.bind(deleteTargetMetadata)), + createRelease: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReleaseResponse.decode.bind(createReleaseResponse), + createReleaseMetadata.decode.bind(createReleaseMetadata)), + createRollout: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createRolloutResponse.decode.bind(createRolloutResponse), + createRolloutMetadata.decode.bind(createRolloutMetadata)), + createAutomation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAutomationResponse.decode.bind(createAutomationResponse), + createAutomationMetadata.decode.bind(createAutomationMetadata)), + updateAutomation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAutomationResponse.decode.bind(updateAutomationResponse), + updateAutomationMetadata.decode.bind(updateAutomationMetadata)), + deleteAutomation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAutomationResponse.decode.bind(deleteAutomationResponse), + deleteAutomationMetadata.decode.bind(deleteAutomationMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.deploy.v1.CloudDeploy', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.cloudDeployStub) { + return this.cloudDeployStub; + } + + // Put together the "service stub" for + // google.cloud.deploy.v1.CloudDeploy. + this.cloudDeployStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.deploy.v1.CloudDeploy') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.deploy.v1.CloudDeploy, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cloudDeployStubMethods = + ['listDeliveryPipelines', 'getDeliveryPipeline', 'createDeliveryPipeline', 'updateDeliveryPipeline', 'deleteDeliveryPipeline', 'listTargets', 'rollbackTarget', 'getTarget', 'createTarget', 'updateTarget', 'deleteTarget', 'listReleases', 'getRelease', 'createRelease', 'abandonRelease', 'approveRollout', 'advanceRollout', 'cancelRollout', 'listRollouts', 'getRollout', 'createRollout', 'ignoreJob', 'retryJob', 'listJobRuns', 'getJobRun', 'terminateJobRun', 'getConfig', 'createAutomation', 'updateAutomation', 'deleteAutomation', 'getAutomation', 'listAutomations', 'getAutomationRun', 'listAutomationRuns', 'cancelAutomationRun']; + for (const methodName of cloudDeployStubMethods) { + const callPromise = this.cloudDeployStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.cloudDeployStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'clouddeploy.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'clouddeploy.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets details of a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `DeliveryPipeline`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async + */ + getDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|undefined, {}|undefined + ]>; + getDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, + {}|null|undefined>): void; + getDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, + {}|null|undefined>): void; + getDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IDeliveryPipeline, + protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDeliveryPipeline(request, options, callback); + } +/** + * Creates a `Rollout` to roll back the specified target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} request.targetId + * Required. ID of the `Target` that is being rolled back. + * @param {string} request.rolloutId + * Required. ID of the rollback `Rollout` to create. + * @param {string} [request.releaseId] + * Optional. ID of the `Release` to roll back to. If this isn't specified, the + * previous successful `Rollout` to the specified target will be used to + * determine the `Release`. + * @param {string} [request.rolloutToRollBack] + * Optional. If provided, this must be the latest `Rollout` that is on the + * `Target`. + * @param {google.cloud.deploy.v1.RollbackTargetConfig} [request.rollbackConfig] + * Optional. Configs for the rollback `Rollout`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with a `RollbackTargetResponse`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.RollbackTargetResponse|RollbackTargetResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.rollback_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async + */ + rollbackTarget( + request?: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest|undefined, {}|undefined + ]>; + rollbackTarget( + request: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, + {}|null|undefined>): void; + rollbackTarget( + request: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, + {}|null|undefined>): void; + rollbackTarget( + request?: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.rollbackTarget(request, options, callback); + } +/** + * Gets details of a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Target`. Format must be + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Target|Target}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetTarget_async + */ + getTarget( + request?: protos.google.cloud.deploy.v1.IGetTargetRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest|undefined, {}|undefined + ]>; + getTarget( + request: protos.google.cloud.deploy.v1.IGetTargetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, + {}|null|undefined>): void; + getTarget( + request: protos.google.cloud.deploy.v1.IGetTargetRequest, + callback: Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, + {}|null|undefined>): void; + getTarget( + request?: protos.google.cloud.deploy.v1.IGetTargetRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IGetTargetRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getTarget(request, options, callback); + } +/** + * Gets details of a single Release. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Release`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Release|Release}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetRelease_async + */ + getRelease( + request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest|undefined, {}|undefined + ]>; + getRelease( + request: protos.google.cloud.deploy.v1.IGetReleaseRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, + {}|null|undefined>): void; + getRelease( + request: protos.google.cloud.deploy.v1.IGetReleaseRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, + {}|null|undefined>): void; + getRelease( + request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IGetReleaseRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getRelease(request, options, callback); + } +/** + * Abandons a Release in the Delivery Pipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Release. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AbandonReleaseResponse|AbandonReleaseResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.abandon_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async + */ + abandonRelease( + request?: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest|undefined, {}|undefined + ]>; + abandonRelease( + request: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, + {}|null|undefined>): void; + abandonRelease( + request: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, + {}|null|undefined>): void; + abandonRelease( + request?: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IAbandonReleaseResponse, + protos.google.cloud.deploy.v1.IAbandonReleaseRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.abandonRelease(request, options, callback); + } +/** + * Approves a Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * @param {boolean} request.approved + * Required. True = approve; false = reject + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.ApproveRolloutResponse|ApproveRolloutResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.approve_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async + */ + approveRollout( + request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest|undefined, {}|undefined + ]>; + approveRollout( + request: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, + {}|null|undefined>): void; + approveRollout( + request: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, + {}|null|undefined>): void; + approveRollout( + request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IApproveRolloutResponse, + protos.google.cloud.deploy.v1.IApproveRolloutRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.approveRollout(request, options, callback); + } +/** + * Advances a Rollout in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * @param {string} request.phaseId + * Required. The phase ID to advance the `Rollout` to. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AdvanceRolloutResponse|AdvanceRolloutResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.advance_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async + */ + advanceRollout( + request?: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, + protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|undefined, {}|undefined + ]>; + advanceRollout( + request: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, + protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, + {}|null|undefined>): void; + advanceRollout( + request: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, + protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, + {}|null|undefined>): void; + advanceRollout( + request?: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, + protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, + protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, + protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.advanceRollout(request, options, callback); + } +/** + * Cancels a Rollout in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.CancelRolloutResponse|CancelRolloutResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.cancel_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CancelRollout_async + */ + cancelRollout( + request?: protos.google.cloud.deploy.v1.ICancelRolloutRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.ICancelRolloutResponse, + protos.google.cloud.deploy.v1.ICancelRolloutRequest|undefined, {}|undefined + ]>; + cancelRollout( + request: protos.google.cloud.deploy.v1.ICancelRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.ICancelRolloutResponse, + protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, + {}|null|undefined>): void; + cancelRollout( + request: protos.google.cloud.deploy.v1.ICancelRolloutRequest, + callback: Callback< + protos.google.cloud.deploy.v1.ICancelRolloutResponse, + protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, + {}|null|undefined>): void; + cancelRollout( + request?: protos.google.cloud.deploy.v1.ICancelRolloutRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.ICancelRolloutResponse, + protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.ICancelRolloutResponse, + protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.ICancelRolloutResponse, + protos.google.cloud.deploy.v1.ICancelRolloutRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelRollout(request, options, callback); + } +/** + * Gets details of a single Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Rollout`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetRollout_async + */ + getRollout( + request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest|undefined, {}|undefined + ]>; + getRollout( + request: protos.google.cloud.deploy.v1.IGetRolloutRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, + {}|null|undefined>): void; + getRollout( + request: protos.google.cloud.deploy.v1.IGetRolloutRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, + {}|null|undefined>): void; + getRollout( + request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IGetRolloutRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getRollout(request, options, callback); + } +/** + * Ignores the specified Job in a Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.rollout + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * @param {string} request.phaseId + * Required. The phase ID the Job to ignore belongs to. + * @param {string} request.jobId + * Required. The job ID for the Job to ignore. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.IgnoreJobResponse|IgnoreJobResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.ignore_job.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async + */ + ignoreJob( + request?: protos.google.cloud.deploy.v1.IIgnoreJobRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IIgnoreJobResponse, + protos.google.cloud.deploy.v1.IIgnoreJobRequest|undefined, {}|undefined + ]>; + ignoreJob( + request: protos.google.cloud.deploy.v1.IIgnoreJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IIgnoreJobResponse, + protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, + {}|null|undefined>): void; + ignoreJob( + request: protos.google.cloud.deploy.v1.IIgnoreJobRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IIgnoreJobResponse, + protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, + {}|null|undefined>): void; + ignoreJob( + request?: protos.google.cloud.deploy.v1.IIgnoreJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IIgnoreJobResponse, + protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IIgnoreJobResponse, + protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IIgnoreJobResponse, + protos.google.cloud.deploy.v1.IIgnoreJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'rollout': request.rollout ?? '', + }); + this.initialize(); + return this.innerApiCalls.ignoreJob(request, options, callback); + } +/** + * Retries the specified Job in a Rollout. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.rollout + * Required. Name of the Rollout. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * @param {string} request.phaseId + * Required. The phase ID the Job to retry belongs to. + * @param {string} request.jobId + * Required. The job ID for the Job to retry. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.RetryJobResponse|RetryJobResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.retry_job.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_RetryJob_async + */ + retryJob( + request?: protos.google.cloud.deploy.v1.IRetryJobRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest|undefined, {}|undefined + ]>; + retryJob( + request: protos.google.cloud.deploy.v1.IRetryJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, + {}|null|undefined>): void; + retryJob( + request: protos.google.cloud.deploy.v1.IRetryJobRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, + {}|null|undefined>): void; + retryJob( + request?: protos.google.cloud.deploy.v1.IRetryJobRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IRetryJobResponse, + protos.google.cloud.deploy.v1.IRetryJobRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'rollout': request.rollout ?? '', + }); + this.initialize(); + return this.innerApiCalls.retryJob(request, options, callback); + } +/** + * Gets details of a single JobRun. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `JobRun`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_job_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetJobRun_async + */ + getJobRun( + request?: protos.google.cloud.deploy.v1.IGetJobRunRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest|undefined, {}|undefined + ]>; + getJobRun( + request: protos.google.cloud.deploy.v1.IGetJobRunRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, + {}|null|undefined>): void; + getJobRun( + request: protos.google.cloud.deploy.v1.IGetJobRunRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, + {}|null|undefined>): void; + getJobRun( + request?: protos.google.cloud.deploy.v1.IGetJobRunRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IJobRun, + protos.google.cloud.deploy.v1.IGetJobRunRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getJobRun(request, options, callback); + } +/** + * Terminates a Job Run in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `JobRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.TerminateJobRunResponse|TerminateJobRunResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.terminate_job_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async + */ + terminateJobRun( + request?: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.ITerminateJobRunResponse, + protos.google.cloud.deploy.v1.ITerminateJobRunRequest|undefined, {}|undefined + ]>; + terminateJobRun( + request: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.ITerminateJobRunResponse, + protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, + {}|null|undefined>): void; + terminateJobRun( + request: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, + callback: Callback< + protos.google.cloud.deploy.v1.ITerminateJobRunResponse, + protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, + {}|null|undefined>): void; + terminateJobRun( + request?: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.ITerminateJobRunResponse, + protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.ITerminateJobRunResponse, + protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.ITerminateJobRunResponse, + protos.google.cloud.deploy.v1.ITerminateJobRunRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.terminateJobRun(request, options, callback); + } +/** + * Gets the configuration for a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of requested configuration. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Config|Config}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_config.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetConfig_async + */ + getConfig( + request?: protos.google.cloud.deploy.v1.IGetConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest|undefined, {}|undefined + ]>; + getConfig( + request: protos.google.cloud.deploy.v1.IGetConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, + {}|null|undefined>): void; + getConfig( + request: protos.google.cloud.deploy.v1.IGetConfigRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, + {}|null|undefined>): void; + getConfig( + request?: protos.google.cloud.deploy.v1.IGetConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IConfig, + protos.google.cloud.deploy.v1.IGetConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getConfig(request, options, callback); + } +/** + * Gets details of a single Automation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `Automation`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Automation|Automation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetAutomation_async + */ + getAutomation( + request?: protos.google.cloud.deploy.v1.IGetAutomationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest|undefined, {}|undefined + ]>; + getAutomation( + request: protos.google.cloud.deploy.v1.IGetAutomationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, + {}|null|undefined>): void; + getAutomation( + request: protos.google.cloud.deploy.v1.IGetAutomationRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, + {}|null|undefined>): void; + getAutomation( + request?: protos.google.cloud.deploy.v1.IGetAutomationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAutomation(request, options, callback); + } +/** + * Gets details of a single AutomationRun. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `AutomationRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.get_automation_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async + */ + getAutomationRun( + request?: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest|undefined, {}|undefined + ]>; + getAutomationRun( + request: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, + {}|null|undefined>): void; + getAutomationRun( + request: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, + {}|null|undefined>): void; + getAutomationRun( + request?: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAutomationRun(request, options, callback); + } +/** + * Cancels an AutomationRun. The `state` of the `AutomationRun` after + * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on + * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun + * in a different state returns an `FAILED_PRECONDITION` error. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `AutomationRun`. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.CancelAutomationRunResponse|CancelAutomationRunResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.cancel_automation_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async + */ + cancelAutomationRun( + request?: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|undefined, {}|undefined + ]>; + cancelAutomationRun( + request: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, + {}|null|undefined>): void; + cancelAutomationRun( + request: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + callback: Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, + {}|null|undefined>): void; + cancelAutomationRun( + request?: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelAutomationRun(request, options, callback); + } + +/** + * Creates a new DeliveryPipeline in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `DeliveryPipeline` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}`. + * @param {string} request.deliveryPipelineId + * Required. ID of the `DeliveryPipeline`. + * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline + * Required. The `DeliveryPipeline` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async + */ + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createDeliveryPipeline(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createDeliveryPipeline()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async + */ + async checkCreateDeliveryPipelineProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * `DeliveryPipeline` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline + * Required. The `DeliveryPipeline` to update. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `DeliveryPipeline` that does not exist + * will result in the creation of a new `DeliveryPipeline`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async + */ + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'delivery_pipeline.name': request.deliveryPipeline!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDeliveryPipeline(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDeliveryPipeline()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async + */ + async checkUpdateDeliveryPipelineProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single DeliveryPipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `DeliveryPipeline` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeliveryPipeline` will succeed. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * actually post it. + * @param {boolean} [request.force] + * Optional. If set to true, all child resources under this pipeline will also + * be deleted. Otherwise, the request will only work if the pipeline has no + * child resources. + * @param {string} [request.etag] + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async + */ + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDeliveryPipeline(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteDeliveryPipeline()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async + */ + async checkDeleteDeliveryPipelineProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new Target in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Target` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}`. + * @param {string} request.targetId + * Required. ID of the `Target`. + * @param {google.cloud.deploy.v1.Target} request.target + * Required. The `Target` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async + */ + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createTarget(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async + */ + async checkCreateTargetProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createTarget, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Target resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.Target} request.target + * Required. The `Target` to update. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `Target` that does not exist will + * result in the creation of a new `Target`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async + */ + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'target.name': request.target!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateTarget(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async + */ + async checkUpdateTargetProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateTarget, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single Target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `Target` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * `Target` will succeed. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * actually post it. + * @param {string} [request.etag] + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async + */ + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteTarget(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteTarget()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async + */ + async checkDeleteTargetProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteTarget, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new Release in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Release` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} request.releaseId + * Required. ID of the `Release`. + * @param {google.cloud.deploy.v1.Release} request.release + * Required. The `Release` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async + */ + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRelease(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createRelease()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async + */ + async checkCreateReleaseProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRelease, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new Rollout in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Rollout` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + * @param {string} request.rolloutId + * Required. ID of the `Rollout`. + * @param {google.cloud.deploy.v1.Rollout} request.rollout + * Required. The `Rollout` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {string} [request.startingPhaseId] + * Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` + * will start at the first phase. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async + */ + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRollout(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createRollout()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async + */ + async checkCreateRolloutProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRollout, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new Automation in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Automation` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} request.automationId + * Required. ID of the `Automation`. + * @param {google.cloud.deploy.v1.Automation} request.automation + * Required. The `Automation` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async + */ + createAutomation( + request?: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createAutomation( + request: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAutomation( + request: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createAutomation( + request?: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAutomation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createAutomation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async + */ + async checkCreateAutomationProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAutomation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single Automation resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Automation` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.Automation} request.automation + * Required. The `Automation` to update. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `Automation` that does not exist will + * result in the creation of a new `Automation`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async + */ + updateAutomation( + request?: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateAutomation( + request: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAutomation( + request: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateAutomation( + request?: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'automation.name': request.automation!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAutomation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateAutomation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async + */ + async checkUpdateAutomationProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateAutomation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single Automation resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `Automation` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * `Automation` will succeed. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and verify whether the resource + * exists, but do not actually post it. + * @param {string} [request.etag] + * Optional. The weak etag of the request. + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async + */ + deleteAutomation( + request?: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteAutomation( + request: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAutomation( + request: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteAutomation( + request?: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAutomation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteAutomation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async + */ + async checkDeleteAutomationProgress(name: string): Promise>{ + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteAutomation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists DeliveryPipelines in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. + * 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 `listDeliveryPipelinesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest|null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + ]>; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline>): void; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline>): void; + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline>): + Promise<[ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest|null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDeliveryPipelines(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline} 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 `listDeliveryPipelinesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeliveryPipelinesStream( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDeliveryPipelines.createStream( + this.innerApiCalls.listDeliveryPipelines as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDeliveryPipelines`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_delivery_pipelines.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async + */ + listDeliveryPipelinesAsync( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDeliveryPipelines.asyncIterate( + this.innerApiCalls['listDeliveryPipelines'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Targets in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Target|Target}. + * 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 `listTargetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest|null, + protos.google.cloud.deploy.v1.IListTargetsResponse + ]>; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, + protos.google.cloud.deploy.v1.ITarget>): void; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, + protos.google.cloud.deploy.v1.ITarget>): void; + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, + protos.google.cloud.deploy.v1.ITarget>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, + protos.google.cloud.deploy.v1.ITarget>): + Promise<[ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest|null, + protos.google.cloud.deploy.v1.IListTargetsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listTargets(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Target|Target} 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 `listTargetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTargetsStream( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTargets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTargets.createStream( + this.innerApiCalls.listTargets as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listTargets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.Target|Target}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_targets.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListTargets_async + */ + listTargetsAsync( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTargets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTargets.asyncIterate( + this.innerApiCalls['listTargets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Releases in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `DeliveryPipeline` which owns this collection of `Release` + * objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Release|Release}. + * 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 `listReleasesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest|null, + protos.google.cloud.deploy.v1.IListReleasesResponse + ]>; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, + protos.google.cloud.deploy.v1.IRelease>): void; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, + protos.google.cloud.deploy.v1.IRelease>): void; + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, + protos.google.cloud.deploy.v1.IRelease>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, + protos.google.cloud.deploy.v1.IRelease>): + Promise<[ + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest|null, + protos.google.cloud.deploy.v1.IListReleasesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listReleases(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 `DeliveryPipeline` which owns this collection of `Release` + * objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Release|Release} 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 `listReleasesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReleasesStream( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReleases']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReleases.createStream( + this.innerApiCalls.listReleases as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listReleases`, 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 `DeliveryPipeline` which owns this collection of `Release` + * objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.Release|Release}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_releases.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListReleases_async + */ + listReleasesAsync( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReleases']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReleases.asyncIterate( + this.innerApiCalls['listReleases'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Rollouts in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Release` which owns this collection of `Rollout` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. + * 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 `listRolloutsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest|null, + protos.google.cloud.deploy.v1.IListRolloutsResponse + ]>; + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, + protos.google.cloud.deploy.v1.IRollout>): void; + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, + protos.google.cloud.deploy.v1.IRollout>): void; + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, + protos.google.cloud.deploy.v1.IRollout>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, + protos.google.cloud.deploy.v1.IRollout>): + Promise<[ + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest|null, + protos.google.cloud.deploy.v1.IListRolloutsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listRollouts(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 `Release` which owns this collection of `Rollout` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Rollout|Rollout} 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 `listRolloutsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listRolloutsStream( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRollouts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRollouts.createStream( + this.innerApiCalls.listRollouts as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listRollouts`, 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 `Release` which owns this collection of `Rollout` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListRollouts` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_rollouts.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListRollouts_async + */ + listRolloutsAsync( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listRollouts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listRollouts.asyncIterate( + this.innerApiCalls['listRollouts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists JobRuns in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `Rollout` which owns this collection of `JobRun` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListJobRuns` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. + * 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 `listJobRunsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listJobRuns( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IJobRun[], + protos.google.cloud.deploy.v1.IListJobRunsRequest|null, + protos.google.cloud.deploy.v1.IListJobRunsResponse + ]>; + listJobRuns( + request: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IJobRun>): void; + listJobRuns( + request: protos.google.cloud.deploy.v1.IListJobRunsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IJobRun>): void; + listJobRuns( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IJobRun>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IJobRun>): + Promise<[ + protos.google.cloud.deploy.v1.IJobRun[], + protos.google.cloud.deploy.v1.IListJobRunsRequest|null, + protos.google.cloud.deploy.v1.IListJobRunsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listJobRuns(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 `Rollout` which owns this collection of `JobRun` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListJobRuns` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.JobRun|JobRun} 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 `listJobRunsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listJobRunsStream( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listJobRuns']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobRuns.createStream( + this.innerApiCalls.listJobRuns as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listJobRuns`, 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 `Rollout` which owns this collection of `JobRun` objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListJobRuns` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match the call that provided + * the page token. + * @param {string} [request.filter] + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_job_runs.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async + */ + listJobRunsAsync( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listJobRuns']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listJobRuns.asyncIterate( + this.innerApiCalls['listJobRuns'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Automations in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {number} request.pageSize + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automations to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Automation|Automation}. + * 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 `listAutomationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutomations( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IAutomation[], + protos.google.cloud.deploy.v1.IListAutomationsRequest|null, + protos.google.cloud.deploy.v1.IListAutomationsResponse + ]>; + listAutomations( + request: protos.google.cloud.deploy.v1.IListAutomationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomation>): void; + listAutomations( + request: protos.google.cloud.deploy.v1.IListAutomationsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomation>): void; + listAutomations( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomation>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomation>): + Promise<[ + protos.google.cloud.deploy.v1.IAutomation[], + protos.google.cloud.deploy.v1.IListAutomationsRequest|null, + protos.google.cloud.deploy.v1.IListAutomationsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listAutomations(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {number} request.pageSize + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automations to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Automation|Automation} 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 `listAutomationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutomationsStream( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAutomations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAutomations.createStream( + this.innerApiCalls.listAutomations as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAutomations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {number} request.pageSize + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomations` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automations to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.Automation|Automation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_automations.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListAutomations_async + */ + listAutomationsAsync( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAutomations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAutomations.asyncIterate( + this.innerApiCalls['listAutomations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists AutomationRuns in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @param {number} request.pageSize + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomationRuns` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automationRuns to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. + * 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 `listAutomationRunsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutomationRuns( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.deploy.v1.IAutomationRun[], + protos.google.cloud.deploy.v1.IListAutomationRunsRequest|null, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse + ]>; + listAutomationRuns( + request: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomationRun>): void; + listAutomationRuns( + request: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomationRun>): void; + listAutomationRuns( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomationRun>, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, + protos.google.cloud.deploy.v1.IAutomationRun>): + Promise<[ + protos.google.cloud.deploy.v1.IAutomationRun[], + protos.google.cloud.deploy.v1.IListAutomationRunsRequest|null, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listAutomationRuns(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @param {number} request.pageSize + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomationRuns` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automationRuns to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun} 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 `listAutomationRunsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutomationRunsStream( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAutomationRuns']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAutomationRuns.createStream( + this.innerApiCalls.listAutomationRuns as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listAutomationRuns`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @param {number} request.pageSize + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomationRuns` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automationRuns to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_automation_runs.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async + */ + listAutomationRunsAsync( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAutomationRuns']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAutomationRuns.asyncIterate( + this.innerApiCalls['listAutomationRuns'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.setIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + return this.iamClient.testIamPermissions(request, options, callback); + } + +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified automation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} automation + * @returns {string} Resource name string. + */ + automationPath(project:string,location:string,deliveryPipeline:string,automation:string) { + return this.pathTemplates.automationPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + automation: automation, + }); + } + + /** + * Parse the project from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName).project; + } + + /** + * Parse the location from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName).location; + } + + /** + * Parse the delivery_pipeline from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName).delivery_pipeline; + } + + /** + * Parse the automation from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the automation. + */ + matchAutomationFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName).automation; + } + + /** + * Return a fully-qualified automationRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} automation_run + * @returns {string} Resource name string. + */ + automationRunPath(project:string,location:string,deliveryPipeline:string,automationRun:string) { + return this.pathTemplates.automationRunPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + automation_run: automationRun, + }); + } + + /** + * Parse the project from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName).project; + } + + /** + * Parse the location from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName).location; + } + + /** + * Parse the delivery_pipeline from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName).delivery_pipeline; + } + + /** + * Parse the automation_run from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the automation_run. + */ + matchAutomationRunFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName).automation_run; + } + + /** + * Return a fully-qualified build resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} build + * @returns {string} Resource name string. + */ + buildPath(project:string,location:string,build:string) { + return this.pathTemplates.buildPathTemplate.render({ + project: project, + location: location, + build: build, + }); + } + + /** + * Parse the project from Build resource. + * + * @param {string} buildName + * A fully-qualified path representing Build resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBuildName(buildName: string) { + return this.pathTemplates.buildPathTemplate.match(buildName).project; + } + + /** + * Parse the location from Build resource. + * + * @param {string} buildName + * A fully-qualified path representing Build resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBuildName(buildName: string) { + return this.pathTemplates.buildPathTemplate.match(buildName).location; + } + + /** + * Parse the build from Build resource. + * + * @param {string} buildName + * A fully-qualified path representing Build resource. + * @returns {string} A string representing the build. + */ + matchBuildFromBuildName(buildName: string) { + return this.pathTemplates.buildPathTemplate.match(buildName).build; + } + + /** + * Return a fully-qualified cluster resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} cluster + * @returns {string} Resource name string. + */ + clusterPath(project:string,location:string,cluster:string) { + return this.pathTemplates.clusterPathTemplate.render({ + project: project, + location: location, + cluster: cluster, + }); + } + + /** + * Parse the project from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the project. + */ + matchProjectFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).project; + } + + /** + * Parse the location from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the location. + */ + matchLocationFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).location; + } + + /** + * Parse the cluster from Cluster resource. + * + * @param {string} clusterName + * A fully-qualified path representing Cluster resource. + * @returns {string} A string representing the cluster. + */ + matchClusterFromClusterName(clusterName: string) { + return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; + } + + /** + * Return a fully-qualified config resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + configPath(project:string,location:string) { + return this.pathTemplates.configPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Config resource. + * + * @param {string} configName + * A fully-qualified path representing Config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConfigName(configName: string) { + return this.pathTemplates.configPathTemplate.match(configName).project; + } + + /** + * Parse the location from Config resource. + * + * @param {string} configName + * A fully-qualified path representing Config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConfigName(configName: string) { + return this.pathTemplates.configPathTemplate.match(configName).location; + } + + /** + * Return a fully-qualified deliveryPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @returns {string} Resource name string. + */ + deliveryPipelinePath(project:string,location:string,deliveryPipeline:string) { + return this.pathTemplates.deliveryPipelinePathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + }); + } + + /** + * Parse the project from DeliveryPipeline resource. + * + * @param {string} deliveryPipelineName + * A fully-qualified path representing DeliveryPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeliveryPipelineName(deliveryPipelineName: string) { + return this.pathTemplates.deliveryPipelinePathTemplate.match(deliveryPipelineName).project; + } + + /** + * Parse the location from DeliveryPipeline resource. + * + * @param {string} deliveryPipelineName + * A fully-qualified path representing DeliveryPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeliveryPipelineName(deliveryPipelineName: string) { + return this.pathTemplates.deliveryPipelinePathTemplate.match(deliveryPipelineName).location; + } + + /** + * Parse the delivery_pipeline from DeliveryPipeline resource. + * + * @param {string} deliveryPipelineName + * A fully-qualified path representing DeliveryPipeline resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromDeliveryPipelineName(deliveryPipelineName: string) { + return this.pathTemplates.deliveryPipelinePathTemplate.match(deliveryPipelineName).delivery_pipeline; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project:string,location:string,job:string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified jobRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} release + * @param {string} rollout + * @param {string} job_run + * @returns {string} Resource name string. + */ + jobRunPath(project:string,location:string,deliveryPipeline:string,release:string,rollout:string,jobRun:string) { + return this.pathTemplates.jobRunPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + release: release, + rollout: rollout, + job_run: jobRun, + }); + } + + /** + * Parse the project from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).project; + } + + /** + * Parse the location from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).location; + } + + /** + * Parse the delivery_pipeline from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).delivery_pipeline; + } + + /** + * Parse the release from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the release. + */ + matchReleaseFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).release; + } + + /** + * Parse the rollout from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the rollout. + */ + matchRolloutFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).rollout; + } + + /** + * Parse the job_run from JobRun resource. + * + * @param {string} jobRunName + * A fully-qualified path representing JobRun resource. + * @returns {string} A string representing the job_run. + */ + matchJobRunFromJobRunName(jobRunName: string) { + return this.pathTemplates.jobRunPathTemplate.match(jobRunName).job_run; + } + + /** + * 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 membership resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} membership + * @returns {string} Resource name string. + */ + membershipPath(project:string,location:string,membership:string) { + return this.pathTemplates.membershipPathTemplate.render({ + project: project, + location: location, + membership: membership, + }); + } + + /** + * Parse the project from Membership resource. + * + * @param {string} membershipName + * A fully-qualified path representing Membership resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMembershipName(membershipName: string) { + return this.pathTemplates.membershipPathTemplate.match(membershipName).project; + } + + /** + * Parse the location from Membership resource. + * + * @param {string} membershipName + * A fully-qualified path representing Membership resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMembershipName(membershipName: string) { + return this.pathTemplates.membershipPathTemplate.match(membershipName).location; + } + + /** + * Parse the membership from Membership resource. + * + * @param {string} membershipName + * A fully-qualified path representing Membership resource. + * @returns {string} A string representing the membership. + */ + matchMembershipFromMembershipName(membershipName: string) { + return this.pathTemplates.membershipPathTemplate.match(membershipName).membership; + } + + /** + * 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 release resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} release + * @returns {string} Resource name string. + */ + releasePath(project:string,location:string,deliveryPipeline:string,release:string) { + return this.pathTemplates.releasePathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + release: release, + }); + } + + /** + * Parse the project from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).project; + } + + /** + * Parse the location from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).location; + } + + /** + * Parse the delivery_pipeline from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).delivery_pipeline; + } + + /** + * Parse the release from Release resource. + * + * @param {string} releaseName + * A fully-qualified path representing Release resource. + * @returns {string} A string representing the release. + */ + matchReleaseFromReleaseName(releaseName: string) { + return this.pathTemplates.releasePathTemplate.match(releaseName).release; + } + + /** + * Return a fully-qualified rollout resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} release + * @param {string} rollout + * @returns {string} Resource name string. + */ + rolloutPath(project:string,location:string,deliveryPipeline:string,release:string,rollout:string) { + return this.pathTemplates.rolloutPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + release: release, + rollout: rollout, + }); + } + + /** + * Parse the project from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the project. + */ + matchProjectFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).project; + } + + /** + * Parse the location from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the location. + */ + matchLocationFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).location; + } + + /** + * Parse the delivery_pipeline from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).delivery_pipeline; + } + + /** + * Parse the release from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the release. + */ + matchReleaseFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).release; + } + + /** + * Parse the rollout from Rollout resource. + * + * @param {string} rolloutName + * A fully-qualified path representing Rollout resource. + * @returns {string} A string representing the rollout. + */ + matchRolloutFromRolloutName(rolloutName: string) { + return this.pathTemplates.rolloutPathTemplate.match(rolloutName).rollout; + } + + /** + * Return a fully-qualified service resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + servicePath(project:string,location:string,service:string) { + return this.pathTemplates.servicePathTemplate.render({ + project: project, + location: location, + service: service, + }); + } + + /** + * Parse the project from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).project; + } + + /** + * Parse the location from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).location; + } + + /** + * Parse the service from Service resource. + * + * @param {string} serviceName + * A fully-qualified path representing Service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromServiceName(serviceName: string) { + return this.pathTemplates.servicePathTemplate.match(serviceName).service; + } + + /** + * Return a fully-qualified target resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} target + * @returns {string} Resource name string. + */ + targetPath(project:string,location:string,target:string) { + return this.pathTemplates.targetPathTemplate.render({ + project: project, + location: location, + target: target, + }); + } + + /** + * Parse the project from Target resource. + * + * @param {string} targetName + * A fully-qualified path representing Target resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTargetName(targetName: string) { + return this.pathTemplates.targetPathTemplate.match(targetName).project; + } + + /** + * Parse the location from Target resource. + * + * @param {string} targetName + * A fully-qualified path representing Target resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTargetName(targetName: string) { + return this.pathTemplates.targetPathTemplate.match(targetName).location; + } + + /** + * Parse the target from Target resource. + * + * @param {string} targetName + * A fully-qualified path representing Target resource. + * @returns {string} A string representing the target. + */ + matchTargetFromTargetName(targetName: string) { + return this.pathTemplates.targetPathTemplate.match(targetName).target; + } + + /** + * 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. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.cloudDeployStub && !this._terminated) { + return this.cloudDeployStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json new file mode 100644 index 00000000000..517f87e4a48 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json @@ -0,0 +1,212 @@ +{ + "interfaces": { + "google.cloud.deploy.v1.CloudDeploy": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListDeliveryPipelines": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDeliveryPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTargets": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RollbackTarget": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetTarget": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateTarget": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateTarget": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTarget": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReleases": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRelease": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRelease": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AbandonRelease": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ApproveRollout": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AdvanceRollout": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelRollout": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListRollouts": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetRollout": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateRollout": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "IgnoreJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RetryJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListJobRuns": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetJobRun": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "TerminateJobRun": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAutomations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAutomationRun": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAutomationRuns": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CancelAutomationRun": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json new file mode 100644 index 00000000000..bbe672c08a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json @@ -0,0 +1,13 @@ +[ + "../../protos/google/cloud/deploy/v1/automation_payload.proto", + "../../protos/google/cloud/deploy/v1/automationrun_payload.proto", + "../../protos/google/cloud/deploy/v1/cloud_deploy.proto", + "../../protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/jobrun_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/log_enums.proto", + "../../protos/google/cloud/deploy/v1/release_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/release_render_payload.proto", + "../../protos/google/cloud/deploy/v1/rollout_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/rollout_update_payload.proto", + "../../protos/google/cloud/deploy/v1/target_notification_payload.proto" +] diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..ea8136ea8b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json @@ -0,0 +1,401 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.deploy.v1", + "libraryPackage": "@google-cloud/deploy", + "services": { + "CloudDeploy": { + "clients": { + "grpc": { + "libraryClient": "CloudDeployClient", + "rpcs": { + "GetDeliveryPipeline": { + "methods": [ + "getDeliveryPipeline" + ] + }, + "RollbackTarget": { + "methods": [ + "rollbackTarget" + ] + }, + "GetTarget": { + "methods": [ + "getTarget" + ] + }, + "GetRelease": { + "methods": [ + "getRelease" + ] + }, + "AbandonRelease": { + "methods": [ + "abandonRelease" + ] + }, + "ApproveRollout": { + "methods": [ + "approveRollout" + ] + }, + "AdvanceRollout": { + "methods": [ + "advanceRollout" + ] + }, + "CancelRollout": { + "methods": [ + "cancelRollout" + ] + }, + "GetRollout": { + "methods": [ + "getRollout" + ] + }, + "IgnoreJob": { + "methods": [ + "ignoreJob" + ] + }, + "RetryJob": { + "methods": [ + "retryJob" + ] + }, + "GetJobRun": { + "methods": [ + "getJobRun" + ] + }, + "TerminateJobRun": { + "methods": [ + "terminateJobRun" + ] + }, + "GetConfig": { + "methods": [ + "getConfig" + ] + }, + "GetAutomation": { + "methods": [ + "getAutomation" + ] + }, + "GetAutomationRun": { + "methods": [ + "getAutomationRun" + ] + }, + "CancelAutomationRun": { + "methods": [ + "cancelAutomationRun" + ] + }, + "CreateDeliveryPipeline": { + "methods": [ + "createDeliveryPipeline" + ] + }, + "UpdateDeliveryPipeline": { + "methods": [ + "updateDeliveryPipeline" + ] + }, + "DeleteDeliveryPipeline": { + "methods": [ + "deleteDeliveryPipeline" + ] + }, + "CreateTarget": { + "methods": [ + "createTarget" + ] + }, + "UpdateTarget": { + "methods": [ + "updateTarget" + ] + }, + "DeleteTarget": { + "methods": [ + "deleteTarget" + ] + }, + "CreateRelease": { + "methods": [ + "createRelease" + ] + }, + "CreateRollout": { + "methods": [ + "createRollout" + ] + }, + "CreateAutomation": { + "methods": [ + "createAutomation" + ] + }, + "UpdateAutomation": { + "methods": [ + "updateAutomation" + ] + }, + "DeleteAutomation": { + "methods": [ + "deleteAutomation" + ] + }, + "ListDeliveryPipelines": { + "methods": [ + "listDeliveryPipelines", + "listDeliveryPipelinesStream", + "listDeliveryPipelinesAsync" + ] + }, + "ListTargets": { + "methods": [ + "listTargets", + "listTargetsStream", + "listTargetsAsync" + ] + }, + "ListReleases": { + "methods": [ + "listReleases", + "listReleasesStream", + "listReleasesAsync" + ] + }, + "ListRollouts": { + "methods": [ + "listRollouts", + "listRolloutsStream", + "listRolloutsAsync" + ] + }, + "ListJobRuns": { + "methods": [ + "listJobRuns", + "listJobRunsStream", + "listJobRunsAsync" + ] + }, + "ListAutomations": { + "methods": [ + "listAutomations", + "listAutomationsStream", + "listAutomationsAsync" + ] + }, + "ListAutomationRuns": { + "methods": [ + "listAutomationRuns", + "listAutomationRunsStream", + "listAutomationRunsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CloudDeployClient", + "rpcs": { + "GetDeliveryPipeline": { + "methods": [ + "getDeliveryPipeline" + ] + }, + "RollbackTarget": { + "methods": [ + "rollbackTarget" + ] + }, + "GetTarget": { + "methods": [ + "getTarget" + ] + }, + "GetRelease": { + "methods": [ + "getRelease" + ] + }, + "AbandonRelease": { + "methods": [ + "abandonRelease" + ] + }, + "ApproveRollout": { + "methods": [ + "approveRollout" + ] + }, + "AdvanceRollout": { + "methods": [ + "advanceRollout" + ] + }, + "CancelRollout": { + "methods": [ + "cancelRollout" + ] + }, + "GetRollout": { + "methods": [ + "getRollout" + ] + }, + "IgnoreJob": { + "methods": [ + "ignoreJob" + ] + }, + "RetryJob": { + "methods": [ + "retryJob" + ] + }, + "GetJobRun": { + "methods": [ + "getJobRun" + ] + }, + "TerminateJobRun": { + "methods": [ + "terminateJobRun" + ] + }, + "GetConfig": { + "methods": [ + "getConfig" + ] + }, + "GetAutomation": { + "methods": [ + "getAutomation" + ] + }, + "GetAutomationRun": { + "methods": [ + "getAutomationRun" + ] + }, + "CancelAutomationRun": { + "methods": [ + "cancelAutomationRun" + ] + }, + "CreateDeliveryPipeline": { + "methods": [ + "createDeliveryPipeline" + ] + }, + "UpdateDeliveryPipeline": { + "methods": [ + "updateDeliveryPipeline" + ] + }, + "DeleteDeliveryPipeline": { + "methods": [ + "deleteDeliveryPipeline" + ] + }, + "CreateTarget": { + "methods": [ + "createTarget" + ] + }, + "UpdateTarget": { + "methods": [ + "updateTarget" + ] + }, + "DeleteTarget": { + "methods": [ + "deleteTarget" + ] + }, + "CreateRelease": { + "methods": [ + "createRelease" + ] + }, + "CreateRollout": { + "methods": [ + "createRollout" + ] + }, + "CreateAutomation": { + "methods": [ + "createAutomation" + ] + }, + "UpdateAutomation": { + "methods": [ + "updateAutomation" + ] + }, + "DeleteAutomation": { + "methods": [ + "deleteAutomation" + ] + }, + "ListDeliveryPipelines": { + "methods": [ + "listDeliveryPipelines", + "listDeliveryPipelinesStream", + "listDeliveryPipelinesAsync" + ] + }, + "ListTargets": { + "methods": [ + "listTargets", + "listTargetsStream", + "listTargetsAsync" + ] + }, + "ListReleases": { + "methods": [ + "listReleases", + "listReleasesStream", + "listReleasesAsync" + ] + }, + "ListRollouts": { + "methods": [ + "listRollouts", + "listRolloutsStream", + "listRolloutsAsync" + ] + }, + "ListJobRuns": { + "methods": [ + "listJobRuns", + "listJobRunsStream", + "listJobRunsAsync" + ] + }, + "ListAutomations": { + "methods": [ + "listAutomations", + "listAutomationsStream", + "listAutomationsAsync" + ] + }, + "ListAutomationRuns": { + "methods": [ + "listAutomationRuns", + "listAutomationRunsStream", + "listAutomationRunsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts new file mode 100644 index 00000000000..f0f4a5919c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {CloudDeployClient} from './cloud_deploy_client'; diff --git a/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..726158e0ffb --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const deploy = require('@google-cloud/deploy'); + +function main() { + const cloudDeployClient = new deploy.CloudDeployClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..b5724129cb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {CloudDeployClient} from '@google-cloud/deploy'; + +// check that the client class type name can be used +function doStuffWithCloudDeployClient(client: CloudDeployClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const cloudDeployClient = new CloudDeployClient(); + doStuffWithCloudDeployClient(cloudDeployClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts b/owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts new file mode 100644 index 00000000000..c8f81b25a86 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts b/owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts new file mode 100644 index 00000000000..af2f7a6acdf --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts @@ -0,0 +1,6938 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as clouddeployModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CloudDeployClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = clouddeployModule.v1.CloudDeployClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = clouddeployModule.v1.CloudDeployClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = clouddeployModule.v1.CloudDeployClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new clouddeployModule.v1.CloudDeployClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudDeployStub, undefined); + await client.initialize(); + assert(client.cloudDeployStub); + }); + + it('has close method for the initialized client', done => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.cloudDeployStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudDeployStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new clouddeployModule.v1.CloudDeployClient({ + 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 clouddeployModule.v1.CloudDeployClient({ + 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('getDeliveryPipeline', () => { + it('invokes getDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ); + client.innerApiCalls.getDeliveryPipeline = stubSimpleCall(expectedResponse); + const [response] = await client.getDeliveryPipeline(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ); + client.innerApiCalls.getDeliveryPipeline = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeliveryPipeline( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IDeliveryPipeline|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeliveryPipeline with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeliveryPipeline = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDeliveryPipeline(request), expectedError); + const actualRequest = (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeliveryPipeline with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDeliveryPipeline(request), expectedError); + }); + }); + + describe('rollbackTarget', () => { + it('invokes rollbackTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetResponse() + ); + client.innerApiCalls.rollbackTarget = stubSimpleCall(expectedResponse); + const [response] = await client.rollbackTarget(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rollbackTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetResponse() + ); + client.innerApiCalls.rollbackTarget = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackTarget( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRollbackTargetResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rollbackTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackTarget with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackTarget = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.rollbackTarget(request), expectedError); + const actualRequest = (client.innerApiCalls.rollbackTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rollbackTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackTarget with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.rollbackTarget(request), expectedError); + }); + }); + + describe('getTarget', () => { + it('invokes getTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Target() + ); + client.innerApiCalls.getTarget = stubSimpleCall(expectedResponse); + const [response] = await client.getTarget(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Target() + ); + client.innerApiCalls.getTarget = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTarget( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.ITarget|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTarget with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTarget = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getTarget(request), expectedError); + const actualRequest = (client.innerApiCalls.getTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTarget with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getTarget(request), expectedError); + }); + }); + + describe('getRelease', () => { + it('invokes getRelease without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Release() + ); + client.innerApiCalls.getRelease = stubSimpleCall(expectedResponse); + const [response] = await client.getRelease(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Release() + ); + client.innerApiCalls.getRelease = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRelease( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRelease|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRelease with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRelease = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRelease(request), expectedError); + const actualRequest = (client.innerApiCalls.getRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRelease with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRelease(request), expectedError); + }); + }); + + describe('abandonRelease', () => { + it('invokes abandonRelease without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseResponse() + ); + client.innerApiCalls.abandonRelease = stubSimpleCall(expectedResponse); + const [response] = await client.abandonRelease(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.abandonRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseResponse() + ); + client.innerApiCalls.abandonRelease = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.abandonRelease( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAbandonReleaseResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.abandonRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonRelease with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonRelease = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.abandonRelease(request), expectedError); + const actualRequest = (client.innerApiCalls.abandonRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonRelease with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AbandonReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.abandonRelease(request), expectedError); + }); + }); + + describe('approveRollout', () => { + it('invokes approveRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutResponse() + ); + client.innerApiCalls.approveRollout = stubSimpleCall(expectedResponse); + const [response] = await client.approveRollout(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes approveRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutResponse() + ); + client.innerApiCalls.approveRollout = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.approveRollout( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IApproveRolloutResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes approveRollout with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.approveRollout = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.approveRollout(request), expectedError); + const actualRequest = (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.approveRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes approveRollout with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ApproveRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.approveRollout(request), expectedError); + }); + }); + + describe('advanceRollout', () => { + it('invokes advanceRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AdvanceRolloutResponse() + ); + client.innerApiCalls.advanceRollout = stubSimpleCall(expectedResponse); + const [response] = await client.advanceRollout(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.advanceRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.advanceRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes advanceRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AdvanceRolloutResponse() + ); + client.innerApiCalls.advanceRollout = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.advanceRollout( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAdvanceRolloutResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.advanceRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.advanceRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes advanceRollout with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.advanceRollout = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.advanceRollout(request), expectedError); + const actualRequest = (client.innerApiCalls.advanceRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.advanceRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes advanceRollout with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.advanceRollout(request), expectedError); + }); + }); + + describe('cancelRollout', () => { + it('invokes cancelRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelRolloutResponse() + ); + client.innerApiCalls.cancelRollout = stubSimpleCall(expectedResponse); + const [response] = await client.cancelRollout(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelRolloutResponse() + ); + client.innerApiCalls.cancelRollout = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelRollout( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.ICancelRolloutResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelRollout with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelRollout = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelRollout(request), expectedError); + const actualRequest = (client.innerApiCalls.cancelRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelRollout with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelRollout(request), expectedError); + }); + }); + + describe('getRollout', () => { + it('invokes getRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Rollout() + ); + client.innerApiCalls.getRollout = stubSimpleCall(expectedResponse); + const [response] = await client.getRollout(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Rollout() + ); + client.innerApiCalls.getRollout = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRollout( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRollout|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRollout with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRollout = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRollout(request), expectedError); + const actualRequest = (client.innerApiCalls.getRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRollout with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getRollout(request), expectedError); + }); + }); + + describe('ignoreJob', () => { + it('invokes ignoreJob without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.IgnoreJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.IgnoreJobResponse() + ); + client.innerApiCalls.ignoreJob = stubSimpleCall(expectedResponse); + const [response] = await client.ignoreJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.ignoreJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.ignoreJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ignoreJob without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.IgnoreJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.IgnoreJobResponse() + ); + client.innerApiCalls.ignoreJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.ignoreJob( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IIgnoreJobResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.ignoreJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.ignoreJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ignoreJob with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.IgnoreJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.ignoreJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.ignoreJob(request), expectedError); + const actualRequest = (client.innerApiCalls.ignoreJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.ignoreJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ignoreJob with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.IgnoreJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.ignoreJob(request), expectedError); + }); + }); + + describe('retryJob', () => { + it('invokes retryJob without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RetryJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.RetryJobResponse() + ); + client.innerApiCalls.retryJob = stubSimpleCall(expectedResponse); + const [response] = await client.retryJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retryJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retryJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retryJob without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RetryJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.RetryJobResponse() + ); + client.innerApiCalls.retryJob = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.retryJob( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRetryJobResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.retryJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retryJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retryJob with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RetryJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedHeaderRequestParams = `rollout=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.retryJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.retryJob(request), expectedError); + const actualRequest = (client.innerApiCalls.retryJob as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.retryJob as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes retryJob with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RetryJobRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); + request.rollout = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.retryJob(request), expectedError); + }); + }); + + describe('getJobRun', () => { + it('invokes getJobRun without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.JobRun() + ); + client.innerApiCalls.getJobRun = stubSimpleCall(expectedResponse); + const [response] = await client.getJobRun(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJobRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJobRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJobRun without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.JobRun() + ); + client.innerApiCalls.getJobRun = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJobRun( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IJobRun|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getJobRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJobRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJobRun with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getJobRun = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getJobRun(request), expectedError); + const actualRequest = (client.innerApiCalls.getJobRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getJobRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJobRun with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJobRun(request), expectedError); + }); + }); + + describe('terminateJobRun', () => { + it('invokes terminateJobRun without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.TerminateJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.TerminateJobRunResponse() + ); + client.innerApiCalls.terminateJobRun = stubSimpleCall(expectedResponse); + const [response] = await client.terminateJobRun(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.terminateJobRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.terminateJobRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes terminateJobRun without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.TerminateJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.TerminateJobRunResponse() + ); + client.innerApiCalls.terminateJobRun = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.terminateJobRun( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.ITerminateJobRunResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.terminateJobRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.terminateJobRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes terminateJobRun with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.TerminateJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.terminateJobRun = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.terminateJobRun(request), expectedError); + const actualRequest = (client.innerApiCalls.terminateJobRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.terminateJobRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes terminateJobRun with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.TerminateJobRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.terminateJobRun(request), expectedError); + }); + }); + + describe('getConfig', () => { + it('invokes getConfig without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Config() + ); + client.innerApiCalls.getConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfig without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Config() + ); + client.innerApiCalls.getConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConfig( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfig with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfig with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConfig(request), expectedError); + }); + }); + + describe('getAutomation', () => { + it('invokes getAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Automation() + ); + client.innerApiCalls.getAutomation = stubSimpleCall(expectedResponse); + const [response] = await client.getAutomation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.Automation() + ); + client.innerApiCalls.getAutomation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutomation( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutomation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAutomation(request), expectedError); + const actualRequest = (client.innerApiCalls.getAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomation with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAutomation(request), expectedError); + }); + }); + + describe('getAutomationRun', () => { + it('invokes getAutomationRun without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ); + client.innerApiCalls.getAutomationRun = stubSimpleCall(expectedResponse); + const [response] = await client.getAutomationRun(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutomationRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutomationRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomationRun without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ); + client.innerApiCalls.getAutomationRun = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutomationRun( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomationRun|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getAutomationRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutomationRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomationRun with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutomationRun = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getAutomationRun(request), expectedError); + const actualRequest = (client.innerApiCalls.getAutomationRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getAutomationRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutomationRun with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAutomationRun(request), expectedError); + }); + }); + + describe('cancelAutomationRun', () => { + it('invokes cancelAutomationRun without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunResponse() + ); + client.innerApiCalls.cancelAutomationRun = stubSimpleCall(expectedResponse); + const [response] = await client.cancelAutomationRun(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelAutomationRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelAutomationRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelAutomationRun without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunResponse() + ); + client.innerApiCalls.cancelAutomationRun = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelAutomationRun( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.ICancelAutomationRunResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.cancelAutomationRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelAutomationRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelAutomationRun with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelAutomationRun = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.cancelAutomationRun(request), expectedError); + const actualRequest = (client.innerApiCalls.cancelAutomationRun as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.cancelAutomationRun as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelAutomationRun with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelAutomationRun(request), expectedError); + }); + }); + + describe('createDeliveryPipeline', () => { + it('invokes createDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(expectedResponse); + const [operation] = await client.createDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDeliveryPipeline( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createDeliveryPipeline(request), expectedError); + const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateDeliveryPipelineProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDeliveryPipelineProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateDeliveryPipelineProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDeliveryPipeline', () => { + it('invokes updateDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeliveryPipeline( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDeliveryPipeline(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + ); + request.deliveryPipeline ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateDeliveryPipelineProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDeliveryPipelineProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateDeliveryPipelineProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteDeliveryPipeline', () => { + it('invokes deleteDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDeliveryPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeliveryPipeline without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDeliveryPipeline( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeliveryPipeline with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteDeliveryPipeline(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeliveryPipeline with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteDeliveryPipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDeliveryPipelineProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteDeliveryPipelineProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDeliveryPipelineProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteDeliveryPipelineProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createTarget', () => { + it('invokes createTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.createTarget(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTarget = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTarget( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTarget with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTarget = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createTarget(request), expectedError); + const actualRequest = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTarget with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTarget = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createTarget(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateTargetProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateTargetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTargetProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateTargetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateTarget', () => { + it('invokes updateTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTarget(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateTarget = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateTarget( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTarget with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTarget = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateTarget(request), expectedError); + const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateTarget with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateTargetRequest() + ); + request.target ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateTarget = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateTarget(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateTargetProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateTargetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateTargetProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateTargetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteTarget', () => { + it('invokes deleteTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTarget(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTarget = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTarget( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTarget with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTarget = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteTarget(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTarget with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteTargetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTarget = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteTarget(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteTargetProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteTargetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteTargetProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteTargetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createRelease', () => { + it('invokes createRelease without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRelease = stubLongRunningCall(expectedResponse); + const [operation] = await client.createRelease(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRelease = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRelease( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRelease with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRelease = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createRelease(request), expectedError); + const actualRequest = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRelease with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRelease = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createRelease(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReleaseProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateReleaseProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReleaseProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateReleaseProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createRollout', () => { + it('invokes createRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRollout = stubLongRunningCall(expectedResponse); + const [operation] = await client.createRollout(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRollout = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRollout( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRollout with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRollout = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createRollout(request), expectedError); + const actualRequest = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRollout with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRollout = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createRollout(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateRolloutProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateRolloutProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRolloutProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateRolloutProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createAutomation', () => { + it('invokes createAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAutomation = stubLongRunningCall(expectedResponse); + const [operation] = await client.createAutomation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAutomation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAutomation( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutomation with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutomation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createAutomation(request), expectedError); + const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutomation with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutomation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createAutomation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAutomationProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateAutomationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAutomationProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateAutomationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateAutomation', () => { + it('invokes updateAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutomation = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAutomation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutomation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAutomation( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomation with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutomation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateAutomation(request), expectedError); + const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomation with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutomation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateAutomation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAutomationProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateAutomationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAutomationProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateAutomationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteAutomation', () => { + it('invokes deleteAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAutomation = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAutomation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAutomation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAutomation( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutomation with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAutomation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteAutomation(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutomation with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAutomation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteAutomation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAutomationProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteAutomationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAutomationProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteAutomationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listDeliveryPipelines', () => { + it('invokes listDeliveryPipelines without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + ]; + client.innerApiCalls.listDeliveryPipelines = stubSimpleCall(expectedResponse); + const [response] = await client.listDeliveryPipelines(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeliveryPipelines without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + ]; + client.innerApiCalls.listDeliveryPipelines = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeliveryPipelines( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IDeliveryPipeline[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeliveryPipelines with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeliveryPipelines = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDeliveryPipelines(request), expectedError); + const actualRequest = (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDeliveryPipelines as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeliveryPipelinesStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + ]; + client.descriptors.page.listDeliveryPipelines.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDeliveryPipelinesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { + 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.listDeliveryPipelines.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeliveryPipelines, request)); + assert( + (client.descriptors.page.listDeliveryPipelines.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDeliveryPipelinesStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeliveryPipelines.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeliveryPipelinesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDeliveryPipelines.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDeliveryPipelines, request)); + assert( + (client.descriptors.page.listDeliveryPipelines.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeliveryPipelines without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), + ]; + client.descriptors.page.listDeliveryPipelines.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + const iterable = client.listDeliveryPipelinesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeliveryPipelines with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeliveryPipelines.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeliveryPipelinesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listTargets', () => { + it('invokes listTargets without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.innerApiCalls.listTargets = stubSimpleCall(expectedResponse); + const [response] = await client.listTargets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTargets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTargets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTargets without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.innerApiCalls.listTargets = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTargets( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.ITarget[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listTargets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTargets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTargets with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTargets = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listTargets(request), expectedError); + const actualRequest = (client.innerApiCalls.listTargets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listTargets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTargetsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.descriptors.page.listTargets.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listTargetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Target[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + 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.listTargets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTargets, request)); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTargetsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTargets.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listTargetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Target[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listTargets, request)); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTargets without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + const iterable = client.listTargetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTargets with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTargetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReleases', () => { + it('invokes listReleases without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.innerApiCalls.listReleases = stubSimpleCall(expectedResponse); + const [response] = await client.listReleases(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReleases as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReleases as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReleases without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.innerApiCalls.listReleases = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReleases( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRelease[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReleases as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReleases as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReleases with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReleases = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listReleases(request), expectedError); + const actualRequest = (client.innerApiCalls.listReleases as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReleases as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReleasesStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.descriptors.page.listReleases.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listReleasesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Release[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + 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.listReleases.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReleases, request)); + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReleasesStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReleases.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listReleasesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Release[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listReleases, request)); + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReleases without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IRelease[] = []; + const iterable = client.listReleasesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listReleases.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReleases.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReleases with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReleasesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IRelease[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listReleases.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listReleases.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listRollouts', () => { + it('invokes listRollouts without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.innerApiCalls.listRollouts = stubSimpleCall(expectedResponse); + const [response] = await client.listRollouts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRollouts without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.innerApiCalls.listRollouts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listRollouts( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRollout[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRollouts with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listRollouts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listRollouts(request), expectedError); + const actualRequest = (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listRollouts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listRolloutsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.descriptors.page.listRollouts.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listRolloutsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Rollout[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { + 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.listRollouts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRollouts, request)); + assert( + (client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listRolloutsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRollouts.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listRolloutsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Rollout[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listRollouts, request)); + assert( + (client.descriptors.page.listRollouts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRollouts without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + ]; + client.descriptors.page.listRollouts.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IRollout[] = []; + const iterable = client.listRolloutsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listRollouts with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListRolloutsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listRollouts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRolloutsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IRollout[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listJobRuns', () => { + it('invokes listJobRuns without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.innerApiCalls.listJobRuns = stubSimpleCall(expectedResponse); + const [response] = await client.listJobRuns(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listJobRuns as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listJobRuns as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobRuns without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.innerApiCalls.listJobRuns = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobRuns( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IJobRun[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listJobRuns as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listJobRuns as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobRuns with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobRuns = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listJobRuns(request), expectedError); + const actualRequest = (client.innerApiCalls.listJobRuns as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listJobRuns as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobRunsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listJobRunsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.JobRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { + 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.listJobRuns.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listJobRuns, request)); + assert( + (client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listJobRunsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listJobRunsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.JobRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listJobRuns, request)); + assert( + (client.descriptors.page.listJobRuns.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listJobRuns without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + ]; + client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; + const iterable = client.listJobRunsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listJobRuns with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListJobRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listJobRunsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAutomations', () => { + it('invokes listAutomations without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + ]; + client.innerApiCalls.listAutomations = stubSimpleCall(expectedResponse); + const [response] = await client.listAutomations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAutomations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAutomations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutomations without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + ]; + client.innerApiCalls.listAutomations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAutomations( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomation[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAutomations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAutomations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutomations with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAutomations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAutomations(request), expectedError); + const actualRequest = (client.innerApiCalls.listAutomations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAutomations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutomationsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + ]; + client.descriptors.page.listAutomations.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAutomationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Automation[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Automation) => { + 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.listAutomations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAutomations, request)); + assert( + (client.descriptors.page.listAutomations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAutomationsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutomations.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAutomationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Automation[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Automation) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAutomations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAutomations, request)); + assert( + (client.descriptors.page.listAutomations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAutomations without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + ]; + client.descriptors.page.listAutomations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IAutomation[] = []; + const iterable = client.listAutomationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAutomations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAutomations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAutomations with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutomations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAutomationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IAutomation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAutomations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAutomations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAutomationRuns', () => { + it('invokes listAutomationRuns without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + ]; + client.innerApiCalls.listAutomationRuns = stubSimpleCall(expectedResponse); + const [response] = await client.listAutomationRuns(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAutomationRuns as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAutomationRuns as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutomationRuns without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + ]; + client.innerApiCalls.listAutomationRuns = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAutomationRuns( + request, + (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomationRun[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listAutomationRuns as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAutomationRuns as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutomationRuns with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAutomationRuns = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listAutomationRuns(request), expectedError); + const actualRequest = (client.innerApiCalls.listAutomationRuns as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listAutomationRuns as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutomationRunsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + ]; + client.descriptors.page.listAutomationRuns.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listAutomationRunsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.AutomationRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.AutomationRun) => { + 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.listAutomationRuns.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAutomationRuns, request)); + assert( + (client.descriptors.page.listAutomationRuns.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAutomationRunsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutomationRuns.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listAutomationRunsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.AutomationRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.AutomationRun) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listAutomationRuns.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listAutomationRuns, request)); + assert( + (client.descriptors.page.listAutomationRuns.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAutomationRuns without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), + ]; + client.descriptors.page.listAutomationRuns.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IAutomationRun[] = []; + const iterable = client.listAutomationRunsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAutomationRuns with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutomationRuns.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAutomationRunsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IAutomationRun[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.TestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request, expectedOptions), expectedError); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('automation', () => { + const fakePath = "/rendered/path/automation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + delivery_pipeline: "deliveryPipelineValue", + automation: "automationValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.automationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('automationPath', () => { + const result = client.automationPath("projectValue", "locationValue", "deliveryPipelineValue", "automationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.automationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAutomationName', () => { + const result = client.matchProjectFromAutomationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAutomationName', () => { + const result = client.matchLocationFromAutomationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeliveryPipelineFromAutomationName', () => { + const result = client.matchDeliveryPipelineFromAutomationName(fakePath); + assert.strictEqual(result, "deliveryPipelineValue"); + assert((client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAutomationFromAutomationName', () => { + const result = client.matchAutomationFromAutomationName(fakePath); + assert.strictEqual(result, "automationValue"); + assert((client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('automationRun', () => { + const fakePath = "/rendered/path/automationRun"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + delivery_pipeline: "deliveryPipelineValue", + automation_run: "automationRunValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automationRunPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.automationRunPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('automationRunPath', () => { + const result = client.automationRunPath("projectValue", "locationValue", "deliveryPipelineValue", "automationRunValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.automationRunPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromAutomationRunName', () => { + const result = client.matchProjectFromAutomationRunName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromAutomationRunName', () => { + const result = client.matchLocationFromAutomationRunName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeliveryPipelineFromAutomationRunName', () => { + const result = client.matchDeliveryPipelineFromAutomationRunName(fakePath); + assert.strictEqual(result, "deliveryPipelineValue"); + assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchAutomationRunFromAutomationRunName', () => { + const result = client.matchAutomationRunFromAutomationRunName(fakePath); + assert.strictEqual(result, "automationRunValue"); + assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('build', () => { + const fakePath = "/rendered/path/build"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + build: "buildValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.buildPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.buildPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('buildPath', () => { + const result = client.buildPath("projectValue", "locationValue", "buildValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.buildPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBuildName', () => { + const result = client.matchProjectFromBuildName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.buildPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBuildName', () => { + const result = client.matchLocationFromBuildName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.buildPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBuildFromBuildName', () => { + const result = client.matchBuildFromBuildName(fakePath); + assert.strictEqual(result, "buildValue"); + assert((client.pathTemplates.buildPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('cluster', () => { + const fakePath = "/rendered/path/cluster"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + cluster: "clusterValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.clusterPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.clusterPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('clusterPath', () => { + const result = client.clusterPath("projectValue", "locationValue", "clusterValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.clusterPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromClusterName', () => { + const result = client.matchProjectFromClusterName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromClusterName', () => { + const result = client.matchLocationFromClusterName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchClusterFromClusterName', () => { + const result = client.matchClusterFromClusterName(fakePath); + assert.strictEqual(result, "clusterValue"); + assert((client.pathTemplates.clusterPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('config', () => { + const fakePath = "/rendered/path/config"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.configPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.configPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('configPath', () => { + const result = client.configPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.configPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConfigName', () => { + const result = client.matchProjectFromConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.configPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromConfigName', () => { + const result = client.matchLocationFromConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.configPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('deliveryPipeline', () => { + const fakePath = "/rendered/path/deliveryPipeline"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + delivery_pipeline: "deliveryPipelineValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.deliveryPipelinePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.deliveryPipelinePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('deliveryPipelinePath', () => { + const result = client.deliveryPipelinePath("projectValue", "locationValue", "deliveryPipelineValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.deliveryPipelinePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDeliveryPipelineName', () => { + const result = client.matchProjectFromDeliveryPipelineName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDeliveryPipelineName', () => { + const result = client.matchLocationFromDeliveryPipelineName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeliveryPipelineFromDeliveryPipelineName', () => { + const result = client.matchDeliveryPipelineFromDeliveryPipelineName(fakePath); + assert.strictEqual(result, "deliveryPipelineValue"); + assert((client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('job', () => { + const fakePath = "/rendered/path/job"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + job: "jobValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath("projectValue", "locationValue", "jobValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, "jobValue"); + assert((client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('jobRun', () => { + const fakePath = "/rendered/path/jobRun"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + delivery_pipeline: "deliveryPipelineValue", + release: "releaseValue", + rollout: "rolloutValue", + job_run: "jobRunValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobRunPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.jobRunPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('jobRunPath', () => { + const result = client.jobRunPath("projectValue", "locationValue", "deliveryPipelineValue", "releaseValue", "rolloutValue", "jobRunValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.jobRunPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromJobRunName', () => { + const result = client.matchProjectFromJobRunName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromJobRunName', () => { + const result = client.matchLocationFromJobRunName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeliveryPipelineFromJobRunName', () => { + const result = client.matchDeliveryPipelineFromJobRunName(fakePath); + assert.strictEqual(result, "deliveryPipelineValue"); + assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReleaseFromJobRunName', () => { + const result = client.matchReleaseFromJobRunName(fakePath); + assert.strictEqual(result, "releaseValue"); + assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRolloutFromJobRunName', () => { + const result = client.matchRolloutFromJobRunName(fakePath); + assert.strictEqual(result, "rolloutValue"); + assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchJobRunFromJobRunName', () => { + const result = client.matchJobRunFromJobRunName(fakePath); + assert.strictEqual(result, "jobRunValue"); + assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + 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('membership', () => { + const fakePath = "/rendered/path/membership"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + membership: "membershipValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.membershipPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.membershipPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('membershipPath', () => { + const result = client.membershipPath("projectValue", "locationValue", "membershipValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.membershipPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMembershipName', () => { + const result = client.matchProjectFromMembershipName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.membershipPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMembershipName', () => { + const result = client.matchLocationFromMembershipName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.membershipPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMembershipFromMembershipName', () => { + const result = client.matchMembershipFromMembershipName(fakePath); + assert.strictEqual(result, "membershipValue"); + assert((client.pathTemplates.membershipPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + 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('release', () => { + const fakePath = "/rendered/path/release"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + delivery_pipeline: "deliveryPipelineValue", + release: "releaseValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.releasePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.releasePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('releasePath', () => { + const result = client.releasePath("projectValue", "locationValue", "deliveryPipelineValue", "releaseValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.releasePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromReleaseName', () => { + const result = client.matchProjectFromReleaseName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromReleaseName', () => { + const result = client.matchLocationFromReleaseName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeliveryPipelineFromReleaseName', () => { + const result = client.matchDeliveryPipelineFromReleaseName(fakePath); + assert.strictEqual(result, "deliveryPipelineValue"); + assert((client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReleaseFromReleaseName', () => { + const result = client.matchReleaseFromReleaseName(fakePath); + assert.strictEqual(result, "releaseValue"); + assert((client.pathTemplates.releasePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('rollout', () => { + const fakePath = "/rendered/path/rollout"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + delivery_pipeline: "deliveryPipelineValue", + release: "releaseValue", + rollout: "rolloutValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.rolloutPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.rolloutPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('rolloutPath', () => { + const result = client.rolloutPath("projectValue", "locationValue", "deliveryPipelineValue", "releaseValue", "rolloutValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.rolloutPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromRolloutName', () => { + const result = client.matchProjectFromRolloutName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromRolloutName', () => { + const result = client.matchLocationFromRolloutName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDeliveryPipelineFromRolloutName', () => { + const result = client.matchDeliveryPipelineFromRolloutName(fakePath); + assert.strictEqual(result, "deliveryPipelineValue"); + assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReleaseFromRolloutName', () => { + const result = client.matchReleaseFromRolloutName(fakePath); + assert.strictEqual(result, "releaseValue"); + assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRolloutFromRolloutName', () => { + const result = client.matchRolloutFromRolloutName(fakePath); + assert.strictEqual(result, "rolloutValue"); + assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('service', () => { + const fakePath = "/rendered/path/service"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + service: "serviceValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.servicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.servicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('servicePath', () => { + const result = client.servicePath("projectValue", "locationValue", "serviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.servicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromServiceName', () => { + const result = client.matchProjectFromServiceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromServiceName', () => { + const result = client.matchLocationFromServiceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchServiceFromServiceName', () => { + const result = client.matchServiceFromServiceName(fakePath); + assert.strictEqual(result, "serviceValue"); + assert((client.pathTemplates.servicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('target', () => { + const fakePath = "/rendered/path/target"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + target: "targetValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.targetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.targetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('targetPath', () => { + const result = client.targetPath("projectValue", "locationValue", "targetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.targetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromTargetName', () => { + const result = client.matchProjectFromTargetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.targetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromTargetName', () => { + const result = client.matchLocationFromTargetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.targetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTargetFromTargetName', () => { + const result = client.matchTargetFromTargetName(fakePath); + assert.strictEqual(result, "targetValue"); + assert((client.pathTemplates.targetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('workerPool', () => { + const fakePath = "/rendered/path/workerPool"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + worker_pool: "workerPoolValue", + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-deploy/v1/tsconfig.json b/owl-bot-staging/google-cloud-deploy/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/google-cloud-deploy/v1/webpack.config.js b/owl-bot-staging/google-cloud-deploy/v1/webpack.config.js new file mode 100644 index 00000000000..0cdbeb51267 --- /dev/null +++ b/owl-bot-staging/google-cloud-deploy/v1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'CloudDeploy', + filename: './cloud-deploy.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From dca46c01bb68b91427514b0b6ebc8e51770d0bb7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 2 Nov 2023 18:06:34 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-deploy/v1/.eslintignore | 7 - .../google-cloud-deploy/v1/.eslintrc.json | 3 - .../google-cloud-deploy/v1/.gitignore | 14 - .../google-cloud-deploy/v1/.jsdoc.js | 55 - .../google-cloud-deploy/v1/.mocharc.js | 33 - .../google-cloud-deploy/v1/.prettierrc.js | 22 - .../google-cloud-deploy/v1/README.md | 1 - .../google-cloud-deploy/v1/package.json | 58 - .../google/cloud/deploy/v1/cloud_deploy.proto | 3678 -- ...eliverypipeline_notification_payload.proto | 38 - .../v1/jobrun_notification_payload.proto | 50 - .../google/cloud/deploy/v1/log_enums.proto | 49 - .../v1/release_notification_payload.proto | 38 - .../deploy/v1/release_render_payload.proto | 38 - .../v1/rollout_notification_payload.proto | 47 - .../v1/target_notification_payload.proto | 38 - .../v1/cloud_deploy.abandon_release.js | 62 - .../v1/cloud_deploy.advance_rollout.js | 67 - .../v1/cloud_deploy.approve_rollout.js | 67 - .../v1/cloud_deploy.cancel_rollout.js | 62 - .../cloud_deploy.create_delivery_pipeline.js | 93 - .../v1/cloud_deploy.create_release.js | 93 - .../v1/cloud_deploy.create_rollout.js | 98 - .../v1/cloud_deploy.create_target.js | 93 - .../cloud_deploy.delete_delivery_pipeline.js | 99 - .../v1/cloud_deploy.delete_target.js | 93 - .../generated/v1/cloud_deploy.get_config.js | 61 - .../v1/cloud_deploy.get_delivery_pipeline.js | 62 - .../generated/v1/cloud_deploy.get_job_run.js | 62 - .../generated/v1/cloud_deploy.get_release.js | 62 - .../generated/v1/cloud_deploy.get_rollout.js | 62 - .../generated/v1/cloud_deploy.get_target.js | 62 - .../generated/v1/cloud_deploy.ignore_job.js | 72 - .../cloud_deploy.list_delivery_pipelines.js | 87 - .../v1/cloud_deploy.list_job_runs.js | 87 - .../v1/cloud_deploy.list_releases.js | 88 - .../v1/cloud_deploy.list_rollouts.js | 87 - .../generated/v1/cloud_deploy.list_targets.js | 88 - .../generated/v1/cloud_deploy.retry_job.js | 72 - .../v1/cloud_deploy.terminate_job_run.js | 62 - .../cloud_deploy.update_delivery_pipeline.js | 95 - .../v1/cloud_deploy.update_target.js | 95 - ...ippet_metadata_google.cloud.deploy.v1.json | 1759 - .../google-cloud-deploy/v1/src/index.ts | 25 - .../v1/src/v1/cloud_deploy_client.ts | 5703 --- .../v1/src/v1/cloud_deploy_client_config.json | 212 - .../v1/src/v1/cloud_deploy_proto_list.json | 13 - .../v1/src/v1/gapic_metadata.json | 401 - .../google-cloud-deploy/v1/src/v1/index.ts | 19 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_cloud_deploy_v1.ts | 6938 --- .../google-cloud-deploy/v1/tsconfig.json | 19 - .../google-cloud-deploy/v1/webpack.config.js | 64 - packages/google-cloud-deploy/README.md | 9 + .../cloud/deploy/v1/automation_payload.proto | 0 .../deploy/v1/automationrun_payload.proto | 0 .../google/cloud/deploy/v1/cloud_deploy.proto | 1074 +- .../deploy/v1/release_render_payload.proto | 7 +- .../deploy/v1/rollout_update_payload.proto | 0 .../google-cloud-deploy/protos/protos.d.ts | 4861 ++- packages/google-cloud-deploy/protos/protos.js | 35976 ++++++++++------ .../google-cloud-deploy/protos/protos.json | 1608 +- .../google-cloud-deploy/samples/README.md | 162 + .../v1/cloud_deploy.abandon_release.js | 3 +- .../v1/cloud_deploy.advance_rollout.js | 3 +- .../v1/cloud_deploy.approve_rollout.js | 3 +- .../v1/cloud_deploy.cancel_automation_run.js | 0 .../v1/cloud_deploy.cancel_rollout.js | 3 +- .../v1/cloud_deploy.create_automation.js | 0 .../cloud_deploy.create_delivery_pipeline.js | 3 +- .../v1/cloud_deploy.create_release.js | 2 +- .../v1/cloud_deploy.create_rollout.js | 2 +- .../v1/cloud_deploy.create_target.js | 2 +- .../v1/cloud_deploy.delete_automation.js | 0 .../cloud_deploy.delete_delivery_pipeline.js | 2 +- .../v1/cloud_deploy.delete_target.js | 2 +- .../v1/cloud_deploy.get_automation.js | 0 .../v1/cloud_deploy.get_automation_run.js | 0 .../v1/cloud_deploy.get_delivery_pipeline.js | 2 +- .../generated/v1/cloud_deploy.get_job_run.js | 2 +- .../generated/v1/cloud_deploy.get_release.js | 2 +- .../generated/v1/cloud_deploy.get_rollout.js | 2 +- .../generated/v1/cloud_deploy.get_target.js | 2 +- .../generated/v1/cloud_deploy.ignore_job.js | 3 +- .../v1/cloud_deploy.list_automation_runs.js | 0 .../v1/cloud_deploy.list_automations.js | 0 .../cloud_deploy.list_delivery_pipelines.js | 2 +- .../generated/v1/cloud_deploy.list_targets.js | 2 +- .../generated/v1/cloud_deploy.retry_job.js | 3 +- .../v1/cloud_deploy.rollback_target.js | 0 .../v1/cloud_deploy.terminate_job_run.js | 3 +- .../v1/cloud_deploy.update_automation.js | 0 ...ippet_metadata_google.cloud.deploy.v1.json | 480 +- .../src/v1/cloud_deploy_client.ts | 3369 +- .../src/v1/cloud_deploy_client_config.json | 44 + .../src/v1/cloud_deploy_proto_list.json | 3 + .../src/v1/gapic_metadata.json | 98 + .../test/gapic_cloud_deploy_v1.ts | 3837 +- 100 files changed, 37225 insertions(+), 35812 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-deploy/v1/webpack.config.js rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/protos/google/cloud/deploy/v1/automation_payload.proto (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/protos/google/cloud/deploy/v1/automationrun_payload.proto (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/protos/google/cloud/deploy/v1/rollout_update_payload.proto (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.cancel_automation_run.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.create_automation.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.delete_automation.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.get_automation.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.get_automation_run.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.list_automation_runs.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.list_automations.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.rollback_target.js (100%) rename {owl-bot-staging/google-cloud-deploy/v1 => packages/google-cloud-deploy}/samples/generated/v1/cloud_deploy.update_automation.js (100%) diff --git a/owl-bot-staging/google-cloud-deploy/v1/.eslintignore b/owl-bot-staging/google-cloud-deploy/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json b/owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/.gitignore b/owl-bot-staging/google-cloud-deploy/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.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/owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js b/owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js deleted file mode 100644 index dc4828af534..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2023 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/deploy', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-deploy/v1/.mocharc.js b/owl-bot-staging/google-cloud-deploy/v1/.mocharc.js deleted file mode 100644 index 1a38f257db7..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js b/owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js deleted file mode 100644 index 55639e70f9e..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/README.md b/owl-bot-staging/google-cloud-deploy/v1/README.md deleted file mode 100644 index b3f04f9632e..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Deploy: Nodejs Client diff --git a/owl-bot-staging/google-cloud-deploy/v1/package.json b/owl-bot-staging/google-cloud-deploy/v1/package.json deleted file mode 100644 index f6d3c40c885..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/deploy", - "version": "0.1.0", - "description": "Deploy client for Node.js", - "repository": "googleapis/nodejs-deploy", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google deploy", - "deploy", - "cloud deploy" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.0.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.1", - "@types/node": "^18.11.18", - "@types/sinon": "^10.0.17", - "c8": "^8.0.1", - "gapic-tools": "^0.2.0", - "gts": "5.0.1", - "jsdoc": "^4.0.2", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.2.0", - "pack-n-play": "^1.0.0-2", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto deleted file mode 100644 index c6e5782a37c..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ /dev/null @@ -1,3678 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.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"; -import "google/type/date.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "CloudDeployProto"; -option java_package = "com.google.cloud.deploy.v1"; -option (google.api.resource_definition) = { - type: "cloudbuild.googleapis.com/Build" - pattern: "projects/{project}/locations/{location}/builds/{build}" -}; -option (google.api.resource_definition) = { - type: "container.googleapis.com/Cluster" - pattern: "projects/{project}/locations/{location}/clusters/{cluster}" -}; -option (google.api.resource_definition) = { - type: "clouddeploy.googleapis.com/Operation" - pattern: "projects/{project}/locations/{location}/operations/{operation}" -}; -option (google.api.resource_definition) = { - type: "cloudbuild.googleapis.com/WorkerPool" - pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" -}; -option (google.api.resource_definition) = { - type: "gkehub.googleapis.com/Membership" - pattern: "projects/{project}/locations/{location}/memberships/{membership}" -}; -option (google.api.resource_definition) = { - type: "run.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/services/{service}" -}; -option (google.api.resource_definition) = { - type: "run.googleapis.com/Job" - pattern: "projects/{project}/locations/{location}/jobs/{job}" -}; - -// CloudDeploy service creates and manages Continuous Delivery operations -// on Google Cloud Platform via Skaffold (https://skaffold.dev). -service CloudDeploy { - option (google.api.default_host) = "clouddeploy.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists DeliveryPipelines in a given project and location. - rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest) - returns (ListDeliveryPipelinesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single DeliveryPipeline. - rpc GetDeliveryPipeline(GetDeliveryPipelineRequest) - returns (DeliveryPipeline) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new DeliveryPipeline in a given project and location. - rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines" - body: "delivery_pipeline" - }; - option (google.api.method_signature) = - "parent,delivery_pipeline,delivery_pipeline_id"; - option (google.longrunning.operation_info) = { - response_type: "DeliveryPipeline" - metadata_type: "OperationMetadata" - }; - } - - // Updates the parameters of a single DeliveryPipeline. - rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}" - body: "delivery_pipeline" - }; - option (google.api.method_signature) = "delivery_pipeline,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DeliveryPipeline" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single DeliveryPipeline. - rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists Targets in a given project and location. - rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/targets" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a `Rollout` to roll back the specified target. - rpc RollbackTarget(RollbackTargetRequest) returns (RollbackTargetResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget" - body: "*" - }; - option (google.api.method_signature) = "name,target_id,rollout_id"; - } - - // Gets details of a single Target. - rpc GetTarget(GetTargetRequest) returns (Target) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/targets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Target in a given project and location. - rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/targets" - body: "target" - }; - option (google.api.method_signature) = "parent,target,target_id"; - option (google.longrunning.operation_info) = { - response_type: "Target" - metadata_type: "OperationMetadata" - }; - } - - // Updates the parameters of a single Target. - rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{target.name=projects/*/locations/*/targets/*}" - body: "target" - }; - option (google.api.method_signature) = "target,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Target" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single Target. - rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/targets/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists Releases in a given project and location. - rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single Release. - rpc GetRelease(GetReleaseRequest) returns (Release) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Release in a given project and location. - rpc CreateRelease(CreateReleaseRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases" - body: "release" - }; - option (google.api.method_signature) = "parent,release,release_id"; - option (google.longrunning.operation_info) = { - response_type: "Release" - metadata_type: "OperationMetadata" - }; - } - - // Abandons a Release in the Delivery Pipeline. - rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Approves a Rollout. - rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Advances a Rollout in a given project and location. - rpc AdvanceRollout(AdvanceRolloutRequest) returns (AdvanceRolloutResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:advance" - body: "*" - }; - option (google.api.method_signature) = "name,phase_id"; - } - - // Cancels a Rollout in a given project and location. - rpc CancelRollout(CancelRolloutRequest) returns (CancelRolloutResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:cancel" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Rollouts in a given project and location. - rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single Rollout. - rpc GetRollout(GetRolloutRequest) returns (Rollout) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Rollout in a given project and location. - rpc CreateRollout(CreateRolloutRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts" - body: "rollout" - }; - option (google.api.method_signature) = "parent,rollout,rollout_id"; - option (google.longrunning.operation_info) = { - response_type: "Rollout" - metadata_type: "OperationMetadata" - }; - } - - // Ignores the specified Job in a Rollout. - rpc IgnoreJob(IgnoreJobRequest) returns (IgnoreJobResponse) { - option (google.api.http) = { - post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:ignoreJob" - body: "*" - }; - option (google.api.method_signature) = "rollout,phase_id,job_id"; - } - - // Retries the specified Job in a Rollout. - rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) { - option (google.api.http) = { - post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob" - body: "*" - }; - option (google.api.method_signature) = "rollout,phase_id,job_id"; - } - - // Lists JobRuns in a given project and location. - rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single JobRun. - rpc GetJobRun(GetJobRunRequest) returns (JobRun) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Terminates a Job Run in a given project and location. - rpc TerminateJobRun(TerminateJobRunRequest) - returns (TerminateJobRunResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}:terminate" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the configuration for a location. - rpc GetConfig(GetConfigRequest) returns (Config) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/config}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Automation in a given project and location. - rpc CreateAutomation(CreateAutomationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" - body: "automation" - }; - option (google.api.method_signature) = "parent,automation,automation_id"; - option (google.longrunning.operation_info) = { - response_type: "Automation" - metadata_type: "OperationMetadata" - }; - } - - // Updates the parameters of a single Automation resource. - rpc UpdateAutomation(UpdateAutomationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}" - body: "automation" - }; - option (google.api.method_signature) = "automation,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Automation" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single Automation resource. - rpc DeleteAutomation(DeleteAutomationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single Automation. - rpc GetAutomation(GetAutomationRequest) returns (Automation) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Automations in a given project and location. - rpc ListAutomations(ListAutomationsRequest) - returns (ListAutomationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single AutomationRun. - rpc GetAutomationRun(GetAutomationRunRequest) returns (AutomationRun) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists AutomationRuns in a given project and location. - rpc ListAutomationRuns(ListAutomationRunsRequest) - returns (ListAutomationRunsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" - }; - option (google.api.method_signature) = "parent"; - } - - // Cancels an AutomationRun. The `state` of the `AutomationRun` after - // cancelling is `CANCELLED`. `CancelAutomationRun` can be called on - // AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun - // in a different state returns an `FAILED_PRECONDITION` error. - rpc CancelAutomationRun(CancelAutomationRunRequest) - returns (CancelAutomationRunResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel" - body: "*" - }; - option (google.api.method_signature) = "name"; - } -} - -// A `DeliveryPipeline` resource in the Cloud Deploy API. -// -// A `DeliveryPipeline` defines a pipeline through which a Skaffold -// configuration can progress. -message DeliveryPipeline { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/DeliveryPipeline" - pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" - }; - - // Optional. Name of the `DeliveryPipeline`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Unique identifier of the `DeliveryPipeline`. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Description of the `DeliveryPipeline`. Max length is 255 characters. - string description = 3; - - // User annotations. These attributes can only be set and used by the - // user, and not by Cloud Deploy. - map annotations = 4; - - // Labels are attributes that can be set and used by both the - // user and by Cloud Deploy. Labels must meet the following constraints: - // - // * Keys and values can contain only lowercase letters, numeric characters, - // underscores, and dashes. - // * All characters must use UTF-8 encoding, and international characters are - // allowed. - // * Keys must start with a lowercase letter or international character. - // * Each resource is limited to a maximum of 64 labels. - // - // Both keys and values are additionally constrained to be <= 128 bytes. - map labels = 5; - - // Output only. Time at which the pipeline was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Most recent time at which the pipeline was updated. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The ordering configuration of the `DeliveryPipeline`. - oneof pipeline { - // SerialPipeline defines a sequential set of stages for a - // `DeliveryPipeline`. - SerialPipeline serial_pipeline = 8; - } - - // Output only. Information around the state of the Delivery Pipeline. - PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 10; - - // When suspended, no new releases or rollouts can be created, - // but in-progress ones will complete. - bool suspended = 12; -} - -// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`. -message SerialPipeline { - // Each stage specifies configuration for a `Target`. The ordering - // of this list defines the promotion flow. - repeated Stage stages = 1; -} - -// Stage specifies a location to which to deploy. -message Stage { - // The target_id to which this stage points. This field refers exclusively to - // the last segment of a target name. For example, this field would just be - // `my-target` (rather than - // `projects/project/locations/location/targets/my-target`). The location of - // the `Target` is inferred to be the same as the location of the - // `DeliveryPipeline` that contains this `Stage`. - string target_id = 1; - - // Skaffold profiles to use when rendering the manifest for this stage's - // `Target`. - repeated string profiles = 2; - - // Optional. The strategy to use for a `Rollout` to this stage. - Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The deploy parameters to use for the target in this stage. - repeated DeployParameters deploy_parameters = 6 - [(google.api.field_behavior) = OPTIONAL]; -} - -// DeployParameters contains deploy parameters information. -message DeployParameters { - // Required. Values are deploy parameters in key-value pairs. - map values = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Deploy parameters are applied to targets with match labels. - // If unspecified, deploy parameters are applied to all targets (including - // child targets of a multi-target). - map match_target_labels = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Strategy contains deployment strategy information. -message Strategy { - // Deployment strategy details. - oneof deployment_strategy { - // Standard deployment strategy executes a single deploy and allows - // verifying the deployment. - Standard standard = 1; - - // Canary deployment strategy provides progressive percentage based - // deployments to a Target. - Canary canary = 2; - } -} - -// Predeploy contains the predeploy job configuration information. -message Predeploy { - // Optional. A sequence of Skaffold custom actions to invoke during execution - // of the predeploy job. - repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Postdeploy contains the postdeploy job configuration information. -message Postdeploy { - // Optional. A sequence of Skaffold custom actions to invoke during execution - // of the postdeploy job. - repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Standard represents the standard deployment strategy. -message Standard { - // Whether to verify a deployment. - bool verify = 1; - - // Optional. Configuration for the predeploy job. If this is not configured, - // predeploy job will not be present. - Predeploy predeploy = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the postdeploy job. If this is not configured, - // postdeploy job will not be present. - Postdeploy postdeploy = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Canary represents the canary deployment strategy. -message Canary { - // Optional. Runtime specific configurations for the deployment strategy. The - // runtime configuration is used to determine how Cloud Deploy will split - // traffic to enable a progressive deployment. - RuntimeConfig runtime_config = 1 [(google.api.field_behavior) = OPTIONAL]; - - // The mode to use for the canary deployment strategy. - oneof mode { - // Configures the progressive based deployment for a Target. - CanaryDeployment canary_deployment = 2; - - // Configures the progressive based deployment for a Target, but allows - // customizing at the phase level where a phase represents each of the - // percentage deployments. - CustomCanaryDeployment custom_canary_deployment = 3; - } -} - -// CanaryDeployment represents the canary deployment configuration -message CanaryDeployment { - // Required. The percentage based deployments that will occur as a part of a - // `Rollout`. List is expected in ascending order and each integer n is - // 0 <= n < 100. - repeated int32 percentages = 1 [(google.api.field_behavior) = REQUIRED]; - - // Whether to run verify tests after each percentage deployment. - bool verify = 2; - - // Optional. Configuration for the predeploy job of the first phase. If this - // is not configured, there will be no predeploy job for this phase. - Predeploy predeploy = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the postdeploy job of the last phase. If this - // is not configured, there will be no postdeploy job for this phase. - Postdeploy postdeploy = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// CustomCanaryDeployment represents the custom canary deployment -// configuration. -message CustomCanaryDeployment { - // PhaseConfig represents the configuration for a phase in the custom - // canary deployment. - message PhaseConfig { - // Required. The ID to assign to the `Rollout` phase. - // This value must consist of lower-case letters, numbers, and hyphens, - // start with a letter and end with a letter or a number, and have a max - // length of 63 characters. In other words, it must match the following - // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - string phase_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Percentage deployment for the phase. - int32 percentage = 2 [(google.api.field_behavior) = REQUIRED]; - - // Skaffold profiles to use when rendering the manifest for this phase. - // These are in addition to the profiles list specified in the - // `DeliveryPipeline` stage. - repeated string profiles = 3; - - // Whether to run verify tests after the deployment. - bool verify = 4; - - // Optional. Configuration for the predeploy job of this phase. If this is - // not configured, there will be no predeploy job for this phase. - Predeploy predeploy = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the postdeploy job of this phase. If this is - // not configured, there will be no postdeploy job for this phase. - Postdeploy postdeploy = 6 [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. Configuration for each phase in the canary deployment in the - // order executed. - repeated PhaseConfig phase_configs = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// KubernetesConfig contains the Kubernetes runtime configuration. -message KubernetesConfig { - // Information about the Kubernetes Gateway API service mesh configuration. - message GatewayServiceMesh { - // Required. Name of the Gateway API HTTPRoute. - string http_route = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the Kubernetes Service. - string service = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the Kubernetes Deployment whose traffic is managed by - // the specified HTTPRoute and Service. - string deployment = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The time to wait for route updates to propagate. The maximum - // configurable time is 3 hours, in seconds format. If unspecified, there is - // no wait time. - google.protobuf.Duration route_update_wait_time = 4 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Information about the Kubernetes Service networking configuration. - message ServiceNetworking { - // Required. Name of the Kubernetes Service. - string service = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the Kubernetes Deployment whose traffic is managed by - // the specified Service. - string deployment = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Whether to disable Pod overprovisioning. If Pod - // overprovisioning is disabled then Cloud Deploy will limit the number of - // total Pods used for the deployment strategy to the number of Pods the - // Deployment has on the cluster. - bool disable_pod_overprovisioning = 3 - [(google.api.field_behavior) = OPTIONAL]; - } - - // The service definition configuration. - oneof service_definition { - // Kubernetes Gateway API service mesh configuration. - GatewayServiceMesh gateway_service_mesh = 1; - - // Kubernetes Service networking configuration. - ServiceNetworking service_networking = 2; - } -} - -// CloudRunConfig contains the Cloud Run runtime configuration. -message CloudRunConfig { - // Whether Cloud Deploy should update the traffic stanza in a Cloud Run - // Service on the user's behalf to facilitate traffic splitting. This is - // required to be true for CanaryDeployments, but optional for - // CustomCanaryDeployments. - bool automatic_traffic_control = 1; -} - -// RuntimeConfig contains the runtime specific configurations for a deployment -// strategy. -message RuntimeConfig { - // The runtime configuration details. - oneof runtime_config { - // Kubernetes runtime configuration. - KubernetesConfig kubernetes = 1; - - // Cloud Run runtime configuration. - CloudRunConfig cloud_run = 2; - } -} - -// PipelineReadyCondition contains information around the status of the -// Pipeline. -message PipelineReadyCondition { - // True if the Pipeline is in a valid state. Otherwise at least one condition - // in `PipelineCondition` is in an invalid state. Iterate over those - // conditions and see which condition(s) has status = false to find out what - // is wrong with the Pipeline. - bool status = 3; - - // Last time the condition was updated. - google.protobuf.Timestamp update_time = 4; -} - -// TargetsPresentCondition contains information on any Targets defined in -// the Delivery Pipeline that do not actually exist. -message TargetsPresentCondition { - // True if there aren't any missing Targets. - bool status = 1; - - // The list of Target names that do not exist. For example, - // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - repeated string missing_targets = 2 [(google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Target" - }]; - - // Last time the condition was updated. - google.protobuf.Timestamp update_time = 4; -} - -// TargetsTypeCondition contains information on whether the Targets defined in -// the Delivery Pipeline are of the same type. -message TargetsTypeCondition { - // True if the targets are all a comparable type. For example this is true if - // all targets are GKE clusters. This is false if some targets are Cloud Run - // targets and others are GKE clusters. - bool status = 1; - - // Human readable error message. - string error_details = 2; -} - -// PipelineCondition contains all conditions relevant to a Delivery Pipeline. -message PipelineCondition { - // Details around the Pipeline's overall status. - PipelineReadyCondition pipeline_ready_condition = 1; - - // Details around targets enumerated in the pipeline. - TargetsPresentCondition targets_present_condition = 3; - - // Details on the whether the targets enumerated in the pipeline are of the - // same type. - TargetsTypeCondition targets_type_condition = 4; -} - -// The request object for `ListDeliveryPipelines`. -message ListDeliveryPipelinesRequest { - // Required. The parent, which owns this collection of pipelines. Format must - // be `projects/{project_id}/locations/{location_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; - - // The maximum number of pipelines to return. The service may return - // fewer than this value. If unspecified, at most 50 pipelines will - // be returned. The maximum value is 1000; values above 1000 will be set - // to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListDeliveryPipelines` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match - // the call that provided the page token. - string page_token = 3; - - // Filter pipelines to be returned. See https://google.aip.dev/160 for more - // details. - string filter = 4; - - // Field to sort by. See https://google.aip.dev/132#ordering for more details. - string order_by = 5; -} - -// The response object from `ListDeliveryPipelines`. -message ListDeliveryPipelinesResponse { - // The `DeliveryPipeline` objects. - repeated DeliveryPipeline delivery_pipelines = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// The request object for `GetDeliveryPipeline` -message GetDeliveryPipelineRequest { - // Required. Name of the `DeliveryPipeline`. Format must be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; -} - -// The request object for `CreateDeliveryPipeline`. -message CreateDeliveryPipelineRequest { - // Required. The parent collection in which the `DeliveryPipeline` should be - // created. Format should be - // `projects/{project_id}/locations/{location_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; - - // Required. ID of the `DeliveryPipeline`. - string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The `DeliveryPipeline` to create. - DeliveryPipeline delivery_pipeline = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `UpdateDeliveryPipeline`. -message UpdateDeliveryPipelineRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // `DeliveryPipeline` resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The `DeliveryPipeline` to update. - DeliveryPipeline delivery_pipeline = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, updating a `DeliveryPipeline` that does not exist - // will result in the creation of a new `DeliveryPipeline`. - bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `DeleteDeliveryPipeline`. -message DeleteDeliveryPipelineRequest { - // Required. The name of the `DeliveryPipeline` to delete. Format should be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, then deleting an already deleted or non-existing - // `DeliveryPipeline` will succeed. - bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, validate the request and preview the review, but do not - // actually post it. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, all child resources under this pipeline will also - // be deleted. Otherwise, the request will only work if the pipeline has no - // child resources. - bool force = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This checksum is computed by the server based on the value of - // other fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configs for the Rollback rollout. -message RollbackTargetConfig { - // Optional. The rollback `Rollout` to create. - Rollout rollout = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The starting phase ID for the `Rollout`. If unspecified, the - // `Rollout` will start in the stable phase. - string starting_phase_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `RollbackTarget`. -message RollbackTargetRequest { - // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be - // created. Format should be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; - - // Required. ID of the `Target` that is being rolled back. - string target_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. ID of the rollback `Rollout` to create. - string rollout_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. ID of the `Release` to roll back to. If this isn't specified, the - // previous successful `Rollout` to the specified target will be used to - // determine the `Release`. - string release_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If provided, this must be the latest `Rollout` that is on the - // `Target`. - string rollout_to_roll_back = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configs for the rollback `Rollout`. - RollbackTargetConfig rollback_config = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with a `RollbackTargetResponse`. - bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response object from `RollbackTarget`. -message RollbackTargetResponse { - // The config of the rollback `Rollout` created or will be created. - RollbackTargetConfig rollback_config = 1; -} - -// A `Target` resource in the Cloud Deploy API. -// -// A `Target` defines a location to which a Skaffold configuration -// can be deployed. -message Target { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/Target" - pattern: "projects/{project}/locations/{location}/targets/{target}" - }; - - // Optional. Name of the `Target`. Format is - // `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Resource id of the `Target`. - string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Unique identifier of the `Target`. - string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the `Target`. Max length is 255 characters. - string description = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. User annotations. These attributes can only be set and used by - // the user, and not by Cloud Deploy. See - // https://google.aip.dev/128#annotations for more details such as format and - // size limitations. - map annotations = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels are attributes that can be set and used by both the - // user and by Cloud Deploy. Labels must meet the following constraints: - // - // * Keys and values can contain only lowercase letters, numeric characters, - // underscores, and dashes. - // * All characters must use UTF-8 encoding, and international characters are - // allowed. - // * Keys must start with a lowercase letter or international character. - // * Each resource is limited to a maximum of 64 labels. - // - // Both keys and values are additionally constrained to be <= 128 bytes. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether or not the `Target` requires approval. - bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Time at which the `Target` was created. - google.protobuf.Timestamp create_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Most recent time at which the `Target` was updated. - google.protobuf.Timestamp update_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Destination to which the Skaffold configuration is applied during a - // rollout. - oneof deployment_target { - // Optional. Information specifying a GKE Cluster. - GkeCluster gke = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Information specifying an Anthos Cluster. - AnthosCluster anthos_cluster = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Information specifying a Cloud Run deployment target. - CloudRunLocation run = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Information specifying a multiTarget. - MultiTarget multi_target = 19 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. This checksum is computed by the server based on the value of - // other fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Configurations for all execution that relates to this `Target`. - // Each `ExecutionEnvironmentUsage` value may only be used in a single - // configuration; using the same value multiple times is an error. - // When one or more configurations are specified, they must include the - // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. - // When no configurations are specified, execution will use the default - // specified in `DefaultPool`. - repeated ExecutionConfig execution_configs = 16; - - // Optional. The deploy parameters to use for this target. - map deploy_parameters = 20 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration of the environment to use when calling Skaffold. -message ExecutionConfig { - // Possible usages of this configuration. - enum ExecutionEnvironmentUsage { - // Default value. This value is unused. - EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0; - - // Use for rendering. - RENDER = 1; - - // Use for deploying and deployment hooks. - DEPLOY = 2; - - // Use for deployment verification. - VERIFY = 3; - - // Use for predeploy job execution. - PREDEPLOY = 4; - - // Use for postdeploy job execution. - POSTDEPLOY = 5; - } - - // Required. Usages when this configuration should be applied. - repeated ExecutionEnvironmentUsage usages = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Details of the environment. - oneof execution_environment { - // Optional. Use default Cloud Build pool. - DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Use private Cloud Build pool. - PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The resource name of the `WorkerPool`, with the format - // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. - // If this optional field is unspecified, the default Cloud Build pool will be - // used. - string worker_pool = 4 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/WorkerPool" - } - ]; - - // Optional. Google service account to use for execution. If unspecified, - // the project execution service account - // (-compute@developer.gserviceaccount.com) is used. - string service_account = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cloud Storage location in which to store execution outputs. This - // can either be a bucket ("gs://my-bucket") or a path within a bucket - // ("gs://my-bucket/my-dir"). - // If unspecified, a default bucket located in the same region will be used. - string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Execution timeout for a Cloud Build Execution. This must be - // between 10m and 24h in seconds format. If unspecified, a default timeout of - // 1h is used. - google.protobuf.Duration execution_timeout = 7 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Execution using the default Cloud Build pool. -message DefaultPool { - // Optional. Google service account to use for execution. If unspecified, - // the project execution service account - // (-compute@developer.gserviceaccount.com) will be used. - string service_account = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cloud Storage location where execution outputs should be stored. - // This can either be a bucket ("gs://my-bucket") or a path within a bucket - // ("gs://my-bucket/my-dir"). - // If unspecified, a default bucket located in the same region will be used. - string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Execution using a private Cloud Build pool. -message PrivatePool { - // Required. Resource name of the Cloud Build worker pool to use. The format - // is `projects/{project}/locations/{location}/workerPools/{pool}`. - string worker_pool = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/WorkerPool" - } - ]; - - // Optional. Google service account to use for execution. If unspecified, - // the project execution service account - // (-compute@developer.gserviceaccount.com) will be used. - string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Cloud Storage location where execution outputs should be stored. - // This can either be a bucket ("gs://my-bucket") or a path within a bucket - // ("gs://my-bucket/my-dir"). - // If unspecified, a default bucket located in the same region will be used. - string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Information specifying a GKE Cluster. -message GkeCluster { - // Information specifying a GKE Cluster. Format is - // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. - string cluster = 1 [(google.api.resource_reference) = { - type: "container.googleapis.com/Cluster" - }]; - - // Optional. If true, `cluster` is accessed using the private IP address of - // the control plane endpoint. Otherwise, the default IP address of the - // control plane endpoint is used. The default IP address is the private IP - // address for clusters with private control-plane endpoints and the public IP - // address otherwise. - // - // Only specify this option when `cluster` is a [private GKE - // cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept). - bool internal_ip = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Information specifying an Anthos Cluster. -message AnthosCluster { - // Membership of the GKE Hub-registered cluster to which to apply the Skaffold - // configuration. Format is - // `projects/{project}/locations/{location}/memberships/{membership_name}`. - string membership = 1 [(google.api.resource_reference) = { - type: "gkehub.googleapis.com/Membership" - }]; -} - -// Information specifying where to deploy a Cloud Run Service. -message CloudRunLocation { - // Required. The location for the Cloud Run Service. Format must be - // `projects/{project}/locations/{location}`. - string location = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; -} - -// Information specifying a multiTarget. -message MultiTarget { - // Required. The target_ids of this multiTarget. - repeated string target_ids = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The request object for `ListTargets`. -message ListTargetsRequest { - // Required. The parent, which owns this collection of targets. Format must be - // `projects/{project_id}/locations/{location_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/Target" - } - ]; - - // Optional. The maximum number of `Target` objects to return. The service may - // return fewer than this value. If unspecified, at most 50 `Target` objects - // will be returned. The maximum value is 1000; values above 1000 will be set - // to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListTargets` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match - // the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter targets to be returned. See https://google.aip.dev/160 for - // more details. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to sort by. See https://google.aip.dev/132#ordering for - // more details. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response object from `ListTargets`. -message ListTargetsResponse { - // The `Target` objects. - repeated Target targets = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// The request object for `GetTarget`. -message GetTargetRequest { - // Required. Name of the `Target`. Format must be - // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Target" - } - ]; -} - -// The request object for `CreateTarget`. -message CreateTargetRequest { - // Required. The parent collection in which the `Target` should be created. - // Format should be - // `projects/{project_id}/locations/{location_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/Target" - } - ]; - - // Required. ID of the `Target`. - string target_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The `Target` to create. - Target target = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `UpdateTarget`. -message UpdateTargetRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Target resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The `Target` to update. - Target target = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, updating a `Target` that does not exist will - // result in the creation of a new `Target`. - bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `DeleteTarget`. -message DeleteTargetRequest { - // Required. The name of the `Target` to delete. Format should be - // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Target" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, then deleting an already deleted or non-existing - // `Target` will succeed. - bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, validate the request and preview the review, but do not - // actually post it. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This checksum is computed by the server based on the value of - // other fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Contains criteria for selecting Targets. Attributes provided must match the -// target resource in order for policy restrictions to apply. E.g. if id "prod" -// and labels "foo: bar" are given the target resource must match both that id -// and have that label in order to be selected. -message TargetAttribute { - // ID of the `Target`. The value of this field could be one of the - // following: - // * The last segment of a target name. It only needs the ID to determine - // which target is being referred to - // * "*", all targets in a location. - string id = 1; - - // Target labels. - map labels = 2; -} - -// A `Release` resource in the Cloud Deploy API. -// -// A `Release` defines a specific Skaffold configuration instance -// that can be deployed. -message Release { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/Release" - pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}" - }; - - // Valid states of the render operation. - enum RenderState { - // The render state is unspecified. - RENDER_STATE_UNSPECIFIED = 0; - - // All rendering operations have completed successfully. - SUCCEEDED = 1; - - // All rendering operations have completed, and one or more have failed. - FAILED = 2; - - // Rendering has started and is not complete. - IN_PROGRESS = 3; - } - - // Details of rendering for a single target. - message TargetRender { - // Valid states of the render operation. - enum TargetRenderState { - // The render operation state is unspecified. - TARGET_RENDER_STATE_UNSPECIFIED = 0; - - // The render operation has completed successfully. - SUCCEEDED = 1; - - // The render operation has failed. - FAILED = 2; - - // The render operation is in progress. - IN_PROGRESS = 3; - } - - // Well-known rendering failures. - enum FailureCause { - // No reason for failure is specified. - FAILURE_CAUSE_UNSPECIFIED = 0; - - // Cloud Build is not available, either because it is not enabled or - // because Cloud Deploy has insufficient permissions. See [required - // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). - CLOUD_BUILD_UNAVAILABLE = 1; - - // The render operation did not complete successfully; check Cloud Build - // logs. - EXECUTION_FAILED = 2; - - // Cloud Build failed to fulfill Cloud Deploy's request. See - // failure_message for additional details. - CLOUD_BUILD_REQUEST_FAILED = 3; - - // The render operation did not complete successfully because the - // verification stanza required for verify was not found on the skaffold - // configuration. - VERIFICATION_CONFIG_NOT_FOUND = 4; - - // The render operation did not complete successfully because the custom - // action required for predeploy or postdeploy was not found in the - // skaffold configuration. See failure_message for additional details. - CUSTOM_ACTION_NOT_FOUND = 5; - } - - // Output only. The resource name of the Cloud Build `Build` object that is - // used to render the manifest for this target. Format is - // `projects/{project}/locations/{location}/builds/{build}`. - string rendering_build = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/Build" - } - ]; - - // Output only. Current state of the render operation for this Target. - TargetRenderState rendering_state = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata related to the `Release` render for this Target. - RenderMetadata metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reason this render failed. This will always be unspecified - // while the render in progress. - FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the render failure, if - // available. - string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // ReleaseReadyCondition contains information around the status of the - // Release. If a release is not ready, you cannot create a rollout with the - // release. - message ReleaseReadyCondition { - // True if the Release is in a valid state. Otherwise at least one condition - // in `ReleaseCondition` is in an invalid state. Iterate over those - // conditions and see which condition(s) has status = false to find out what - // is wrong with the Release. - bool status = 1; - } - - // SkaffoldSupportedCondition contains information about when support for the - // release's version of skaffold ends. - message SkaffoldSupportedCondition { - // True if the version of skaffold used by this release is supported. - bool status = 1; - - // The skaffold support state for this release's version of skaffold. - SkaffoldSupportState skaffold_support_state = 2; - - // The time at which this release's version of skaffold will enter - // maintenance mode. - google.protobuf.Timestamp maintenance_mode_time = 3; - - // The time at which this release's version of skaffold will no longer be - // supported. - google.protobuf.Timestamp support_expiration_time = 4; - } - - // ReleaseCondition contains all conditions relevant to a Release. - message ReleaseCondition { - // Details around the Releases's overall status. - ReleaseReadyCondition release_ready_condition = 1; - - // Details around the support state of the release's skaffold - // version. - SkaffoldSupportedCondition skaffold_supported_condition = 2; - } - - // Optional. Name of the `Release`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Unique identifier of the `Release`. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Description of the `Release`. Max length is 255 characters. - string description = 3; - - // User annotations. These attributes can only be set and used by the - // user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations - // for more details such as format and size limitations. - map annotations = 4; - - // Labels are attributes that can be set and used by both the - // user and by Cloud Deploy. Labels must meet the following constraints: - // - // * Keys and values can contain only lowercase letters, numeric characters, - // underscores, and dashes. - // * All characters must use UTF-8 encoding, and international characters are - // allowed. - // * Keys must start with a lowercase letter or international character. - // * Each resource is limited to a maximum of 64 labels. - // - // Both keys and values are additionally constrained to be <= 128 bytes. - map labels = 5; - - // Output only. Indicates whether this is an abandoned release. - bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `Release` was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the render began. - google.protobuf.Timestamp render_start_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the render completed. - google.protobuf.Timestamp render_end_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Cloud Storage URI of tar.gz archive containing Skaffold configuration. - string skaffold_config_uri = 17; - - // Filepath of the Skaffold config inside of the config URI. - string skaffold_config_path = 9; - - // List of artifacts to pass through to Skaffold command. - repeated BuildArtifact build_artifacts = 10; - - // Output only. Snapshot of the parent pipeline taken at release creation - // time. - DeliveryPipeline delivery_pipeline_snapshot = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Snapshot of the targets taken at release creation time. - repeated Target target_snapshots = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current state of the render operation. - RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 16; - - // The Skaffold version to use when operating on this release, such as - // "1.20.0". Not all versions are valid; Cloud Deploy supports a specific set - // of versions. - // - // If unset, the most recent supported Skaffold version will be used. - string skaffold_version = 19; - - // Output only. Map from target ID to the target artifacts created - // during the render operation. - map target_artifacts = 20 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Map from target ID to details of the render operation for that - // target. - map target_renders = 22 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Information around the state of the Release. - ReleaseCondition condition = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The deploy parameters to use for all targets in this release. - map deploy_parameters = 25 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Description of an a image to use during Skaffold rendering. -message BuildArtifact { - // Image name in Skaffold configuration. - string image = 3; - - // Image tag to use. This will generally be the full path to an image, such - // as "gcr.io/my-project/busybox:1.2.3" or - // "gcr.io/my-project/busybox@sha256:abc123". - string tag = 2; -} - -// The artifacts produced by a target render operation. -message TargetArtifact { - // Contains the paths to the artifacts, relative to the URI, for a phase. - message PhaseArtifact { - // Output only. File path of the resolved Skaffold configuration relative to - // the URI. - string skaffold_config_path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. File path of the rendered manifest relative to the URI. - string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. File path of the directory of rendered job manifests - // relative to the URI. This is only set if it is applicable. - string job_manifests_path = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - oneof uri { - // Output only. URI of a directory containing the artifacts. This contains - // deployment configuration used by Skaffold during a rollout, and all - // paths are relative to this location. - string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. File path of the resolved Skaffold configuration relative to - // the URI. - string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. File path of the rendered manifest relative to the URI. - string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Map from the phase ID to the phase artifacts for the `Target`. - map phase_artifacts = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The artifacts produced by a deploy operation. -message DeployArtifact { - // Output only. URI of a directory containing the artifacts. All paths are - // relative to this location. - string artifact_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. File paths of the manifests applied during the deploy - // operation relative to the URI. - repeated string manifest_paths = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CloudRunRenderMetadata contains Cloud Run information associated with a -// `Release` render. -message CloudRunRenderMetadata { - // Output only. The name of the Cloud Run Service in the rendered manifest. - // Format is `projects/{project}/locations/{location}/services/{service}`. - string service = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "run.googleapis.com/Service" } - ]; -} - -// RenderMetadata includes information associated with a `Release` render. -message RenderMetadata { - // Output only. Metadata associated with rendering for Cloud Run. - CloudRunRenderMetadata cloud_run = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request object for `ListReleases`. -message ListReleasesRequest { - // Required. The `DeliveryPipeline` which owns this collection of `Release` - // objects. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; - - // Optional. The maximum number of `Release` objects to return. The service - // may return fewer than this value. If unspecified, at most 50 `Release` - // objects will be returned. The maximum value is 1000; values above 1000 will - // be set to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListReleases` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match - // the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter releases to be returned. See https://google.aip.dev/160 - // for more details. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to sort by. See https://google.aip.dev/132#ordering for - // more details. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response object from `ListReleases`. -message ListReleasesResponse { - // The `Release` objects. - repeated Release releases = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// The request object for `GetRelease`. -message GetReleaseRequest { - // Required. Name of the `Release`. Format must be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Release" - } - ]; -} - -// The request object for `CreateRelease`, -message CreateReleaseRequest { - // Required. The parent collection in which the `Release` should be created. - // Format should be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/DeliveryPipeline" - } - ]; - - // Required. ID of the `Release`. - string release_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The `Release` to create. - Release release = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A `Rollout` resource in the Cloud Deploy API. -// -// A `Rollout` contains information around a specific deployment to a `Target`. -message Rollout { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/Rollout" - pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}" - }; - - // Valid approval states of a `Rollout`. - enum ApprovalState { - // The `Rollout` has an unspecified approval state. - APPROVAL_STATE_UNSPECIFIED = 0; - - // The `Rollout` requires approval. - NEEDS_APPROVAL = 1; - - // The `Rollout` does not require approval. - DOES_NOT_NEED_APPROVAL = 2; - - // The `Rollout` has been approved. - APPROVED = 3; - - // The `Rollout` has been rejected. - REJECTED = 4; - } - - // Valid states of a `Rollout`. - enum State { - // The `Rollout` has an unspecified state. - STATE_UNSPECIFIED = 0; - - // The `Rollout` has completed successfully. - SUCCEEDED = 1; - - // The `Rollout` has failed. - FAILED = 2; - - // The `Rollout` is being deployed. - IN_PROGRESS = 3; - - // The `Rollout` needs approval. - PENDING_APPROVAL = 4; - - // An approver rejected the `Rollout`. - APPROVAL_REJECTED = 5; - - // The `Rollout` is waiting for an earlier Rollout(s) to complete on this - // `Target`. - PENDING = 6; - - // The `Rollout` is waiting for the `Release` to be fully rendered. - PENDING_RELEASE = 7; - - // The `Rollout` is in the process of being cancelled. - CANCELLING = 8; - - // The `Rollout` has been cancelled. - CANCELLED = 9; - - // The `Rollout` is halted. - HALTED = 10; - } - - // Well-known rollout failures. - enum FailureCause { - // No reason for failure is specified. - FAILURE_CAUSE_UNSPECIFIED = 0; - - // Cloud Build is not available, either because it is not enabled or because - // Cloud Deploy has insufficient permissions. See [required - // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). - CLOUD_BUILD_UNAVAILABLE = 1; - - // The deploy operation did not complete successfully; check Cloud Build - // logs. - EXECUTION_FAILED = 2; - - // Deployment did not complete within the alloted time. - DEADLINE_EXCEEDED = 3; - - // Release is in a failed state. - RELEASE_FAILED = 4; - - // Release is abandoned. - RELEASE_ABANDONED = 5; - - // No skaffold verify configuration was found. - VERIFICATION_CONFIG_NOT_FOUND = 6; - - // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message - // for additional details. - CLOUD_BUILD_REQUEST_FAILED = 7; - } - - // Optional. Name of the `Rollout`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Unique identifier of the `Rollout`. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Description of the `Rollout` for user purposes. Max length is 255 - // characters. - string description = 3; - - // User annotations. These attributes can only be set and used by the - // user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations - // for more details such as format and size limitations. - map annotations = 4; - - // Labels are attributes that can be set and used by both the - // user and by Cloud Deploy. Labels must meet the following constraints: - // - // * Keys and values can contain only lowercase letters, numeric characters, - // underscores, and dashes. - // * All characters must use UTF-8 encoding, and international characters are - // allowed. - // * Keys must start with a lowercase letter or international character. - // * Each resource is limited to a maximum of 64 labels. - // - // Both keys and values are additionally constrained to be <= 128 bytes. - map labels = 5; - - // Output only. Time at which the `Rollout` was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `Rollout` was approved. - google.protobuf.Timestamp approve_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `Rollout` was enqueued. - google.protobuf.Timestamp enqueue_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `Rollout` started deploying. - google.protobuf.Timestamp deploy_start_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `Rollout` finished deploying. - google.protobuf.Timestamp deploy_end_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The ID of Target to which this `Rollout` is deploying. - string target_id = 18 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Approval state of the `Rollout`. - ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current state of the `Rollout`. - State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the rollout failure, if - // available. - string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The resource name of the Cloud Build `Build` object that is - // used to deploy the Rollout. Format is - // `projects/{project}/locations/{location}/builds/{build}`. - string deploying_build = 17 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/Build" - } - ]; - - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 16; - - // Output only. The reason this rollout failed. This will always be - // unspecified while the rollout is in progress. - FailureCause deploy_failure_cause = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The phases that represent the workflows of this `Rollout`. - repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata contains information about the rollout. - Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the `ControllerRollout`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. - string controller_rollout = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the `Rollout` that is rolled back by this `Rollout`. - // Empty if this `Rollout` wasn't created as a rollback. - string rollback_of_rollout = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Names of `Rollouts` that rolled back this `Rollout`. - repeated string rolled_back_by_rollouts = 27 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata includes information associated with a `Rollout`. -message Metadata { - // Output only. The name of the Cloud Run Service that is associated with a - // `Rollout`. - CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. AutomationRolloutMetadata contains the information about the - // interactions between Automation service and this rollout. - AutomationRolloutMetadata automation = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to -// the user. -message DeployJobRunMetadata { - // Output only. The name of the Cloud Run Service that is associated with a - // `DeployJobRun`. - CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CloudRunMetadata contains information from a Cloud Run deployment. -message CloudRunMetadata { - // Output only. The name of the Cloud Run Service that is associated with a - // `Rollout`. Format is - // `projects/{project}/locations/{location}/services/{service}`. - string service = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "run.googleapis.com/Service" } - ]; - - // Output only. The Cloud Run Service urls that are associated with a - // `Rollout`. - repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The Cloud Run Revision id associated with a `Rollout`. - string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Cloud Run job that is associated with a - // `Rollout`. Format is - // `projects/{project}/locations/{location}/jobs/{job_name}`. - string job = 4 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { type: "run.googleapis.com/Job" } - ]; -} - -// AutomationRolloutMetadata contains Automation-related actions that -// were performed on a rollout. -message AutomationRolloutMetadata { - // Output only. The ID of the AutomationRun initiated by a promote release - // rule. - string promote_automation_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The IDs of the AutomationRuns initiated by an advance rollout - // rule. - repeated string advance_automation_runs = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The IDs of the AutomationRuns initiated by a repair rollout - // rule. - repeated string repair_automation_runs = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Phase represents a collection of jobs that are logically grouped together -// for a `Rollout`. -message Phase { - // Valid states of a Phase. - enum State { - // The Phase has an unspecified state. - STATE_UNSPECIFIED = 0; - - // The Phase is waiting for an earlier Phase(s) to complete. - PENDING = 1; - - // The Phase is in progress. - IN_PROGRESS = 2; - - // The Phase has succeeded. - SUCCEEDED = 3; - - // The Phase has failed. - FAILED = 4; - - // The Phase was aborted. - ABORTED = 5; - - // The Phase was skipped. - SKIPPED = 6; - } - - // Output only. The ID of the Phase. - string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current state of the Phase. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information on why the Phase was skipped, if - // available. - string skip_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The job composition of this Phase. - oneof jobs { - // Output only. Deployment job composition. - DeploymentJobs deployment_jobs = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ChildRollout job composition. - ChildRolloutJobs child_rollout_jobs = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// Deployment job composition. -message DeploymentJobs { - // Output only. The deploy Job. This is the deploy job in the phase. - Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The verify Job. Runs after a deploy if the deploy succeeds. - Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The predeploy Job, which is the first job on the phase. - Job predeploy_job = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The postdeploy Job, which is the last job on the phase. - Job postdeploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ChildRollouts job composition -message ChildRolloutJobs { - // Output only. List of CreateChildRolloutJobs - repeated Job create_rollout_jobs = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. List of AdvanceChildRolloutJobs - repeated Job advance_rollout_jobs = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Job represents an operation for a `Rollout`. -message Job { - // Valid states of a Job. - enum State { - // The Job has an unspecified state. - STATE_UNSPECIFIED = 0; - - // The Job is waiting for an earlier Phase(s) or Job(s) to complete. - PENDING = 1; - - // The Job is disabled. - DISABLED = 2; - - // The Job is in progress. - IN_PROGRESS = 3; - - // The Job succeeded. - SUCCEEDED = 4; - - // The Job failed. - FAILED = 5; - - // The Job was aborted. - ABORTED = 6; - - // The Job was skipped. - SKIPPED = 7; - - // The Job was ignored. - IGNORED = 8; - } - - // Output only. The ID of the Job. - string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the Job. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information on why the Job was skipped, if - // available. - string skip_message = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the `JobRun` responsible for the most recent - // invocation of this Job. - string job_run = 3 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/JobRun" - } - ]; - - // The type of Job. - oneof job_type { - // Output only. A deploy Job. - DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A verify Job. - VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A predeploy Job. - PredeployJob predeploy_job = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A postdeploy Job. - PostdeployJob postdeploy_job = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A createChildRollout Job. - CreateChildRolloutJob create_child_rollout_job = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An advanceChildRollout Job. - AdvanceChildRolloutJob advance_child_rollout_job = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// A deploy Job. -message DeployJob {} - -// A verify Job. -message VerifyJob {} - -// A predeploy Job. -message PredeployJob { - // Output only. The custom actions that the predeploy Job executes. - repeated string actions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A postdeploy Job. -message PostdeployJob { - // Output only. The custom actions that the postdeploy Job executes. - repeated string actions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A createChildRollout Job. -message CreateChildRolloutJob {} - -// An advanceChildRollout Job. -message AdvanceChildRolloutJob {} - -// ListRolloutsRequest is the request object used by `ListRollouts`. -message ListRolloutsRequest { - // Required. The `Release` which owns this collection of `Rollout` objects. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Release" - } - ]; - - // Optional. The maximum number of `Rollout` objects to return. The service - // may return fewer than this value. If unspecified, at most 50 `Rollout` - // objects will be returned. The maximum value is 1000; values above 1000 will - // be set to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListRollouts` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match - // the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - // for more details. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to sort by. See https://google.aip.dev/132#ordering for - // more details. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// ListRolloutsResponse is the response object reutrned by `ListRollouts`. -message ListRolloutsResponse { - // The `Rollout` objects. - repeated Rollout rollouts = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// GetRolloutRequest is the request object used by `GetRollout`. -message GetRolloutRequest { - // Required. Name of the `Rollout`. Format must be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; -} - -// CreateRolloutRequest is the request object used by `CreateRollout`. -message CreateRolloutRequest { - // Required. The parent collection in which the `Rollout` should be created. - // Format should be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Release" - } - ]; - - // Required. ID of the `Rollout`. - string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The `Rollout` to create. - Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` - // will start at the first phase. - string starting_phase_id = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Server-defined resource path for the target of the operation. - string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Name of the verb executed by the operation. - string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Human-readable status of the operation, if any. - string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Identifies whether the user has requested cancellation - // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. - bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. API version used to start the operation. - string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request object used by `ApproveRollout`. -message ApproveRolloutRequest { - // Required. Name of the Rollout. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; - - // Required. True = approve; false = reject - bool approved = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The response object from `ApproveRollout`. -message ApproveRolloutResponse {} - -// The request object used by `AdvanceRollout`. -message AdvanceRolloutRequest { - // Required. Name of the Rollout. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; - - // Required. The phase ID to advance the `Rollout` to. - string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The response object from `AdvanceRollout`. -message AdvanceRolloutResponse {} - -// The request object used by `CancelRollout`. -message CancelRolloutRequest { - // Required. Name of the Rollout. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; -} - -// The response object from `CancelRollout`. -message CancelRolloutResponse {} - -// The request object used by `IgnoreJob`. -message IgnoreJobRequest { - // Required. Name of the Rollout. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - string rollout = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; - - // Required. The phase ID the Job to ignore belongs to. - string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job ID for the Job to ignore. - string job_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The response object from `IgnoreJob`. -message IgnoreJobResponse {} - -// RetryJobRequest is the request object used by `RetryJob`. -message RetryJobRequest { - // Required. Name of the Rollout. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - string rollout = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; - - // Required. The phase ID the Job to retry belongs to. - string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job ID for the Job to retry. - string job_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The response object from 'RetryJob'. -message RetryJobResponse {} - -// The request object used by `AbandonRelease`. -message AbandonReleaseRequest { - // Required. Name of the Release. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Release" - } - ]; -} - -// The response object for `AbandonRelease`. -message AbandonReleaseResponse {} - -// A `JobRun` resource in the Cloud Deploy API. -// -// A `JobRun` contains information of a single `Rollout` job evaluation. -message JobRun { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/JobRun" - pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}" - }; - - // Valid states of a `JobRun`. - enum State { - // The `JobRun` has an unspecified state. - STATE_UNSPECIFIED = 0; - - // The `JobRun` is in progress. - IN_PROGRESS = 1; - - // The `JobRun` has succeeded. - SUCCEEDED = 2; - - // The `JobRun` has failed. - FAILED = 3; - - // The `JobRun` is terminating. - TERMINATING = 4; - - // The `JobRun` was terminated. - TERMINATED = 5; - } - - // Optional. Name of the `JobRun`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Unique identifier of the `JobRun`. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the `Rollout` phase this `JobRun` belongs in. - string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the `Rollout` job this `JobRun` corresponds to. - string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `JobRun` was created. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `JobRun` was started. - google.protobuf.Timestamp start_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `JobRun` ended. - google.protobuf.Timestamp end_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current state of the `JobRun`. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The `JobRun` type and the information for that type. - oneof job_run { - // Output only. Information specific to a deploy `JobRun`. - DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Information specific to a verify `JobRun`. - VerifyJobRun verify_job_run = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Information specific to a predeploy `JobRun`. - PredeployJobRun predeploy_job_run = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Information specific to a postdeploy `JobRun`. - PostdeployJobRun postdeploy_job_run = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Information specific to a createChildRollout `JobRun`. - CreateChildRolloutJobRun create_child_rollout_job_run = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Information specific to an advanceChildRollout `JobRun` - AdvanceChildRolloutJobRun advance_child_rollout_job_run = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. This checksum is computed by the server based on the value of - // other fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// DeployJobRun contains information specific to a deploy `JobRun`. -message DeployJobRun { - // Well-known deploy failures. - enum FailureCause { - // No reason for failure is specified. - FAILURE_CAUSE_UNSPECIFIED = 0; - - // Cloud Build is not available, either because it is not enabled or because - // Cloud Deploy has insufficient permissions. See [Required - // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). - CLOUD_BUILD_UNAVAILABLE = 1; - - // The deploy operation did not complete successfully; check Cloud Build - // logs. - EXECUTION_FAILED = 2; - - // The deploy job run did not complete within the alloted time. - DEADLINE_EXCEEDED = 3; - - // There were missing resources in the runtime environment required for a - // canary deployment. Check the Cloud Build logs for more information. - MISSING_RESOURCES_FOR_CANARY = 4; - - // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message - // for additional details. - CLOUD_BUILD_REQUEST_FAILED = 5; - } - - // Output only. The resource name of the Cloud Build `Build` object that is - // used to deploy. Format is - // `projects/{project}/locations/{location}/builds/{build}`. - string build = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/Build" - } - ]; - - // Output only. The reason the deploy failed. This will always be unspecified - // while the deploy is in progress or if it succeeded. - FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the deploy failure, if available. - string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Metadata containing information about the deploy job run. - DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The artifact of a deploy job run, if available. - DeployArtifact artifact = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// VerifyJobRun contains information specific to a verify `JobRun`. -message VerifyJobRun { - // Well-known verify failures. - enum FailureCause { - // No reason for failure is specified. - FAILURE_CAUSE_UNSPECIFIED = 0; - - // Cloud Build is not available, either because it is not enabled or because - // Cloud Deploy has insufficient permissions. See [required - // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). - CLOUD_BUILD_UNAVAILABLE = 1; - - // The verify operation did not complete successfully; check Cloud Build - // logs. - EXECUTION_FAILED = 2; - - // The verify job run did not complete within the alloted time. - DEADLINE_EXCEEDED = 3; - - // No Skaffold verify configuration was found. - VERIFICATION_CONFIG_NOT_FOUND = 4; - - // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message - // for additional details. - CLOUD_BUILD_REQUEST_FAILED = 5; - } - - // Output only. The resource name of the Cloud Build `Build` object that is - // used to verify. Format is - // `projects/{project}/locations/{location}/builds/{build}`. - string build = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/Build" - } - ]; - - // Output only. URI of a directory containing the verify artifacts. This - // contains the Skaffold event log. - string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. File path of the Skaffold event log relative to the artifact - // URI. - string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The reason the verify failed. This will always be unspecified - // while the verify is in progress or if it succeeded. - FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the verify failure, if available. - string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// PredeployJobRun contains information specific to a predeploy `JobRun`. -message PredeployJobRun { - // Well-known predeploy failures. - enum FailureCause { - // No reason for failure is specified. - FAILURE_CAUSE_UNSPECIFIED = 0; - - // Cloud Build is not available, either because it is not enabled or because - // Cloud Deploy has insufficient permissions. See [required - // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). - CLOUD_BUILD_UNAVAILABLE = 1; - - // The predeploy operation did not complete successfully; check Cloud Build - // logs. - EXECUTION_FAILED = 2; - - // The predeploy job run did not complete within the alloted time. - DEADLINE_EXCEEDED = 3; - - // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message - // for additional details. - CLOUD_BUILD_REQUEST_FAILED = 4; - } - - // Output only. The resource name of the Cloud Build `Build` object that is - // used to execute the custom actions associated with the predeploy Job. - // Format is `projects/{project}/locations/{location}/builds/{build}`. - string build = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/Build" - } - ]; - - // Output only. The reason the predeploy failed. This will always be - // unspecified while the predeploy is in progress or if it succeeded. - FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the predeploy failure, if - // available. - string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// PostdeployJobRun contains information specific to a postdeploy `JobRun`. -message PostdeployJobRun { - // Well-known postdeploy failures. - enum FailureCause { - // No reason for failure is specified. - FAILURE_CAUSE_UNSPECIFIED = 0; - - // Cloud Build is not available, either because it is not enabled or because - // Cloud Deploy has insufficient permissions. See [required - // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions). - CLOUD_BUILD_UNAVAILABLE = 1; - - // The postdeploy operation did not complete successfully; check Cloud Build - // logs. - EXECUTION_FAILED = 2; - - // The postdeploy job run did not complete within the alloted time. - DEADLINE_EXCEEDED = 3; - - // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message - // for additional details. - CLOUD_BUILD_REQUEST_FAILED = 4; - } - - // Output only. The resource name of the Cloud Build `Build` object that is - // used to execute the custom actions associated with the postdeploy Job. - // Format is `projects/{project}/locations/{location}/builds/{build}`. - string build = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "cloudbuild.googleapis.com/Build" - } - ]; - - // Output only. The reason the postdeploy failed. This will always be - // unspecified while the postdeploy is in progress or if it succeeded. - FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information about the postdeploy failure, if - // available. - string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// CreateChildRolloutJobRun contains information specific to a -// createChildRollout `JobRun`. -message CreateChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. - string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ID of the childRollout Phase initiated by this JobRun. - string rollout_phase_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// AdvanceChildRolloutJobRun contains information specific to a -// advanceChildRollout `JobRun`. -message AdvanceChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. - string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. the ID of the ChildRollout's Phase. - string rollout_phase_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ListJobRunsRequest is the request object used by `ListJobRuns`. -message ListJobRunsRequest { - // Required. The `Rollout` which owns this collection of `JobRun` objects. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Rollout" - } - ]; - - // Optional. The maximum number of `JobRun` objects to return. The service may - // return fewer than this value. If unspecified, at most 50 `JobRun` objects - // will be returned. The maximum value is 1000; values above 1000 will be set - // to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListJobRuns` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match the call that provided - // the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filter results to be returned. See https://google.aip.dev/160 for - // more details. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to sort by. See https://google.aip.dev/132#ordering for - // more details. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// ListJobRunsResponse is the response object returned by `ListJobRuns`. -message ListJobRunsResponse { - // The `JobRun` objects. - repeated JobRun job_runs = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. If - // this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached - repeated string unreachable = 3; -} - -// GetJobRunRequest is the request object used by `GetJobRun`. -message GetJobRunRequest { - // Required. Name of the `JobRun`. Format must be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/JobRun" - } - ]; -} - -// The request object used by `TerminateJobRun`. -message TerminateJobRunRequest { - // Required. Name of the `JobRun`. Format must be - // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/JobRun" - } - ]; -} - -// The response object from `TerminateJobRun`. -message TerminateJobRunResponse {} - -// Service-wide configuration. -message Config { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/Config" - pattern: "projects/{project}/locations/{location}/config" - }; - - // Name of the configuration. - string name = 1; - - // All supported versions of Skaffold. - repeated SkaffoldVersion supported_versions = 2; - - // Default Skaffold version that is assigned when a Release is created without - // specifying a Skaffold version. - string default_skaffold_version = 3; -} - -// Details of a supported Skaffold version. -message SkaffoldVersion { - // Release version number. For example, "1.20.3". - string version = 1; - - // The time at which this version of skaffold will enter maintenance mode. - google.protobuf.Timestamp maintenance_mode_time = 3; - - // The time at which this version of skaffold will no longer be supported. - google.protobuf.Timestamp support_expiration_time = 4; - - // Date when this version is expected to no longer be supported. - google.type.Date support_end_date = 2; -} - -// Request to get a configuration. -message GetConfigRequest { - // Required. Name of requested configuration. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Config" - } - ]; -} - -// An `Automation` resource in the Cloud Deploy API. -// -// An `Automation` enables the automation of manually driven actions for -// a Delivery Pipeline, which includes Release promotion amongst Targets, -// Rollout repair and Rollout deployment strategy advancement. The intention -// of Automation is to reduce manual intervention in the continuous delivery -// process. -message Automation { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/Automation" - pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}" - style: DECLARATIVE_FRIENDLY - }; - - // Output only. Name of the `Automation`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Unique identifier of the `Automation`. - string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Description of the `Automation`. Max length is 255 characters. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Time at which the automation was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the automation was updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User annotations. These attributes can only be set and used by - // the user, and not by Cloud Deploy. Annotations must meet the following - // constraints: - // - // * Annotations are key/value pairs. - // * Valid annotation keys have two segments: an optional prefix and name, - // separated by a slash (`/`). - // * The name segment is required and must be 63 characters or less, - // beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with - // dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between. - // * The prefix is optional. If specified, the prefix must be a DNS subdomain: - // a series of DNS labels separated by dots(`.`), not longer than 253 - // characters in total, followed by a slash (`/`). - // - // See - // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set - // for more details. - map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels are attributes that can be set and used by both the - // user and by Cloud Deploy. Labels must meet the following constraints: - // - // * Keys and values can contain only lowercase letters, numeric characters, - // underscores, and dashes. - // * All characters must use UTF-8 encoding, and international characters are - // allowed. - // * Keys must start with a lowercase letter or international character. - // * Each resource is limited to a maximum of 64 labels. - // - // Both keys and values are additionally constrained to be <= 63 characters. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The weak etag of the `Automation` resource. - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When Suspended, automation is deactivated from execution. - bool suspended = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Email address of the user-managed IAM service account that - // creates Cloud Deploy release and rollout resources. - string service_account = 10 [(google.api.field_behavior) = REQUIRED]; - - // Required. Selected resources to which the automation will be applied. - AutomationResourceSelector selector = 11 - [(google.api.field_behavior) = REQUIRED]; - - // Required. List of Automation rules associated with the Automation resource. - // Must have at least one rule and limited to 250 rules per Delivery Pipeline. - // Note: the order of the rules here is not the same as the order of - // execution. - repeated AutomationRule rules = 14 [(google.api.field_behavior) = REQUIRED]; -} - -// AutomationResourceSelector contains the information to select the resources -// to which an Automation is going to be applied. -message AutomationResourceSelector { - // Contains attributes about a target. - repeated TargetAttribute targets = 1; -} - -// `AutomationRule` defines the automation activities. -message AutomationRule { - // The configuration of the Automation rule. - oneof rule { - // Optional. `PromoteReleaseRule` will automatically promote a release from - // the current target to a specified target. - PromoteReleaseRule promote_release_rule = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The `AdvanceRolloutRule` will automatically advance a - // successful Rollout. - AdvanceRolloutRule advance_rollout_rule = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The `RepairRolloutRule` will automatically repair a failed - // rollout. - RepairRolloutRule repair_rollout_rule = 3 - [(google.api.field_behavior) = OPTIONAL]; - } -} - -// `PromoteRelease` rule will automatically promote a release from the current -// target to a specified target. -message PromoteReleaseRule { - // Required. ID of the rule. This id must be unique in the `Automation` - // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. - string id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. How long the release need to be paused until being promoted to - // the next target. - google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The ID of the stage in the pipeline to which this `Release` is - // deploying. If unspecified, default it to the next stage in the promotion - // flow. The value of this field could be one of the following: - // * The last segment of a target name. It only needs the ID to determine - // if the target is one of the stages in the promotion sequence defined - // in the pipeline. - // * "@next", the next target in the promotion sequence. - string destination_target_id = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Information around the state of the Automation rule. - AutomationRuleCondition condition = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The starting phase of the rollout created by this operation. - // Default to the first phase. - string destination_phase = 8 [(google.api.field_behavior) = OPTIONAL]; -} - -// The `AdvanceRollout` automation rule will automatically advance a successful -// Rollout to the next phase. -message AdvanceRolloutRule { - // Required. ID of the rule. This id must be unique in the `Automation` - // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. - string id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Proceeds only after phase name matched any one in the list. - // This value must consist of lower-case letters, numbers, and hyphens, - // start with a letter and end with a letter or a number, and have a max - // length of 63 characters. In other words, it must match the following - // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - repeated string source_phases = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. How long to wait after a rollout is finished. - google.protobuf.Duration wait = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Information around the state of the Automation rule. - AutomationRuleCondition condition = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The `RepairRolloutRule` automation rule will automatically repair a failed -// `Rollout`. -message RepairRolloutRule { - // Required. ID of the rule. This id must be unique in the `Automation` - // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. - string id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Phases within which jobs are subject to automatic repair actions - // on failure. Proceeds only after phase name matched any one in the list, or - // for all phases if unspecified. This value must consist of lower-case - // letters, numbers, and hyphens, start with a letter and end with a letter or - // a number, and have a max length of 63 characters. In other words, it must - // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - repeated string source_phases = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Jobs to repair. Proceeds only after job name matched any one in - // the list, or for all jobs if unspecified or empty. The phase that includes - // the job must match the phase ID specified in `source_phase`. This value - // must consist of lower-case letters, numbers, and hyphens, start with a - // letter and end with a letter or a number, and have a max length of 63 - // characters. In other words, it must match the following regex: - // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - repeated string jobs = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Defines the types of automatic repair actions for failed jobs. - repeated RepairMode repair_modes = 4 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Information around the state of the 'Automation' rule. - AutomationRuleCondition condition = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration of the repair action. -message RepairMode { - // The repair action to perform. - oneof mode { - // Optional. Retries a failed job. - Retry retry = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Rolls back a `Rollout`. - Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL]; - } -} - -// Retries the failed job. -message Retry { - // Required. Total number of retries. Retry will skipped if set to 0; The - // minimum value is 1, and the maximum value is 10. - int64 attempts = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. How long to wait for the first retry. Default is 0, and the - // maximum value is 14d. - google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The pattern of how wait time will be increased. Default is - // linear. Backoff mode will be ignored if `wait` is 0. - BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Rolls back a `Rollout`. -message Rollback { - // Optional. The starting phase ID for the `Rollout`. If unspecified, the - // `Rollout` will start in the stable phase. - string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// `AutomationRuleCondition` contains conditions relevant to an -// `Automation` rule. -message AutomationRuleCondition { - // Optional. Details around targets enumerated in the rule. - TargetsPresentCondition targets_present_condition = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `CreateAutomation`. -message CreateAutomationRequest { - // Required. The parent collection in which the `Automation` should be - // created. Format should be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/Automation" - } - ]; - - // Required. ID of the `Automation`. - string automation_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The `Automation` to create. - Automation automation = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `UpdateAutomation`. -message UpdateAutomationRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // `Automation` resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The `Automation` to update. - Automation automation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes since the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, updating a `Automation` that does not exist will - // result in the creation of a new `Automation`. - bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, the request is validated and the user is provided - // with an expected result, but no actual change is made. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `DeleteAutomation`. -message DeleteAutomationRequest { - // Required. The name of the `Automation` to delete. Format should be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Automation" - } - ]; - - // Optional. A request ID to identify requests. Specify a unique request ID - // so that if you must retry your request, the server will know to ignore - // the request if it has already been completed. The server will guarantee - // that for at least 60 minutes after the first request. - // - // For example, consider a situation where you make an initial request and the - // request times out. If you make the request again with the same request ID, - // the server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents clients - // from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, then deleting an already deleted or non-existing - // `Automation` will succeed. - bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, validate the request and verify whether the resource - // exists, but do not actually post it. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The weak etag of the request. - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The request object for `ListAutomations`. -message ListAutomationsRequest { - // Required. The parent, which owns this collection of automations. Format - // must be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/Automation" - } - ]; - - // The maximum number of automations to return. The service may return - // fewer than this value. If unspecified, at most 50 automations will - // be returned. The maximum value is 1000; values above 1000 will be set - // to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListAutomations` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match - // the call that provided the page token. - string page_token = 3; - - // Filter automations to be returned. All fields can be used in the - // filter. - string filter = 4; - - // Field to sort by. - string order_by = 5; -} - -// The response object from `ListAutomations`. -message ListAutomationsResponse { - // The `Automations` objects. - repeated Automation automations = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// The request object for `GetAutomation` -message GetAutomationRequest { - // Required. Name of the `Automation`. Format must be - // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/Automation" - } - ]; -} - -// An `AutomationRun` resource in the Cloud Deploy API. -// -// An `AutomationRun` represents an automation execution instance of an -// automation rule. -message AutomationRun { - option (google.api.resource) = { - type: "clouddeploy.googleapis.com/AutomationRun" - pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}" - }; - - // Valid state of an `AutomationRun`. - enum State { - // The `AutomationRun` has an unspecified state. - STATE_UNSPECIFIED = 0; - - // The `AutomationRun` has succeeded. - SUCCEEDED = 1; - - // The `AutomationRun` was cancelled. - CANCELLED = 2; - - // The `AutomationRun` has failed. - FAILED = 3; - - // The `AutomationRun` is in progress. - IN_PROGRESS = 4; - - // The `AutomationRun` is pending. - PENDING = 5; - } - - // Output only. Name of the `AutomationRun`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the `AutomationRun` was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time at which the automationRun was updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The weak etag of the `AutomationRun` resource. - // This checksum is computed by the server based on the value of other - // fields, and may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. - string etag = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Email address of the user-managed IAM service account that - // performs the operations against Cloud Deploy resources. - string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Snapshot of the Automation taken at AutomationRun creation - // time. - Automation automation_snapshot = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ID of the target that represents the promotion stage that - // initiates the `AutomationRun`. The value of this field is the last segment - // of a target name. - string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current state of the `AutomationRun`. - State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Explains the current state of the `AutomationRun`. Present - // only an explanation is needed. - string state_description = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time the `AutomationRun` will expire. An `AutomationRun` will - // expire after 14 days from its creation date. - google.protobuf.Timestamp expire_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ID of the automation rule that initiated the operation. - string rule_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ID of the automation that initiated the operation. - string automation_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The operation that the `AutomationRun` will perform. - oneof operation { - // Output only. Promotes a release to a specified 'Target'. - PromoteReleaseOperation promote_release_operation = 13 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Advances a rollout to the next phase. - AdvanceRolloutOperation advance_rollout_operation = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Repairs a failed 'Rollout'. - RepairRolloutOperation repair_rollout_operation = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Earliest time the `AutomationRun` will attempt to resume. - // Wait-time is configured by `wait` in automation rule. - google.protobuf.Timestamp wait_until_time = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Contains the information of an automated promote-release operation. -message PromoteReleaseOperation { - // Output only. The ID of the target that represents the promotion stage to - // which the release will be promoted. The value of this field is the last - // segment of a target name. - string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. How long the operation will be paused. - google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the rollout that initiates the `AutomationRun`. - string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The starting phase of the rollout created by this operation. - string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Contains the information of an automated advance-rollout operation. -message AdvanceRolloutOperation { - // Output only. The phase of a deployment that initiated the operation. - string source_phase = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. How long the operation will be paused. - google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the rollout that initiates the `AutomationRun`. - string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The phase to which the rollout will be advanced to. - string destination_phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Contains the information for an automated `repair rollout` operation. -message RepairRolloutOperation { - // Output only. The name of the rollout that initiates the `AutomationRun`. - string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The index of the current repair action in the repair sequence. - int64 current_repair_mode_index = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Records of the repair attempts. Each repair phase may have - // multiple retry attempts or single rollback attempt. - repeated RepairPhase repair_phases = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// RepairPhase tracks the repair attempts that have been made for -// each `RepairMode` specified in the `Automation` resource. -message RepairPhase { - oneof repair_phase { - // Output only. Records of the retry attempts for retry repair mode. - RetryPhase retry = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Rollback attempt for rollback repair mode . - RollbackAttempt rollback = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// RetryPhase contains the retry attempts and the metadata for initiating a -// new attempt. -message RetryPhase { - // Output only. The number of attempts that have been made. - int64 total_attempts = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The pattern of how the wait time of the retry attempt is - // calculated. - BackoffMode backoff_mode = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The phase ID of the phase that includes the job being retried. - string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The job ID for the Job to retry. - string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Detail of a retry action. - repeated RetryAttempt attempts = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// RetryAttempt represents an action of retrying the failed Cloud Deploy job. -message RetryAttempt { - // Output only. The index of this retry attempt. - int64 attempt = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. How long the operation will be paused. - google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Valid state of this retry action. - RepairState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Description of the state of the Retry. - string state_desc = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'. -message RollbackAttempt { - // Output only. The phase to which the rollout will be rolled back to. - string destination_phase = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the rollback `Rollout` to create. - string rollout_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Valid state of this rollback action. - RepairState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Description of the state of the Rollback. - string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The request object for `ListAutomationRuns`. -message ListAutomationRunsRequest { - // Required. The parent, which owns this collection of automationRuns. Format - // must be - // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "clouddeploy.googleapis.com/AutomationRun" - } - ]; - - // The maximum number of automationRuns to return. The service may return - // fewer than this value. If unspecified, at most 50 automationRuns will - // be returned. The maximum value is 1000; values above 1000 will be set - // to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListAutomationRuns` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other provided parameters match - // the call that provided the page token. - string page_token = 3; - - // Filter automationRuns to be returned. All fields can be used in the - // filter. - string filter = 4; - - // Field to sort by. - string order_by = 5; -} - -// The response object from `ListAutomationRuns`. -message ListAutomationRunsResponse { - // The `AutomationRuns` objects. - repeated AutomationRun automation_runs = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// The request object for `GetAutomationRun` -message GetAutomationRunRequest { - // Required. Name of the `AutomationRun`. Format must be - // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/AutomationRun" - } - ]; -} - -// The request object used by `CancelAutomationRun`. -message CancelAutomationRunRequest { - // Required. Name of the `AutomationRun`. Format is - // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "clouddeploy.googleapis.com/AutomationRun" - } - ]; -} - -// The response object from `CancelAutomationRun`. -message CancelAutomationRunResponse {} - -// The support state of a specific Skaffold version. -enum SkaffoldSupportState { - // Default value. This value is unused. - SKAFFOLD_SUPPORT_STATE_UNSPECIFIED = 0; - - // This skaffold version is currently supported. - SKAFFOLD_SUPPORT_STATE_SUPPORTED = 1; - - // This skaffold version is in maintenance mode. - SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE = 2; - - // This skaffold version is no longer supported. - SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3; -} - -// The pattern of how wait time is increased. -enum BackoffMode { - // No WaitMode is specified. - BACKOFF_MODE_UNSPECIFIED = 0; - - // Increases the wait time linearly. - BACKOFF_MODE_LINEAR = 1; - - // Increases the wait time exponentially. - BACKOFF_MODE_EXPONENTIAL = 2; -} - -// Valid state of a repair attempt. -enum RepairState { - // The `repair` has an unspecified state. - REPAIR_STATE_UNSPECIFIED = 0; - - // The `repair` action has succeeded. - REPAIR_STATE_SUCCEEDED = 1; - - // The `repair` action was cancelled. - REPAIR_STATE_CANCELLED = 2; - - // The `repair` action has failed. - REPAIR_STATE_FAILED = 3; - - // The `repair` action is in progress. - REPAIR_STATE_IN_PROGRESS = 4; - - // The `repair` action is pending. - REPAIR_STATE_PENDING = 5; - - // The `repair` action was skipped. - REPAIR_STATE_SKIPPED = 6; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto deleted file mode 100644 index 1b110254216..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -import "google/cloud/deploy/v1/log_enums.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "DeliveryPipelineNotificationPayloadProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Payload proto for "clouddeploy.googleapis.com/deliverypipeline_notification" -// Platform Log event that describes the failure to send delivery pipeline -// status change Pub/Sub notification. -message DeliveryPipelineNotificationEvent { - // Debug message for when a notification fails to send. - string message = 1; - - // The name of the `Delivery Pipeline`. - string delivery_pipeline = 2; - - // Type of this notification, e.g. for a Pub/Sub failure. - Type type = 3; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto deleted file mode 100644 index 5e4392467f7..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/jobrun_notification_payload.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -import "google/cloud/deploy/v1/log_enums.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "JobRunNotificationPayloadProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Payload proto for "clouddeploy.googleapis.com/jobrun_notification" -// Platform Log event that describes the failure to send JobRun resource update -// Pub/Sub notification. -message JobRunNotificationEvent { - // Debug message for when a notification fails to send. - string message = 1; - - // The name of the `JobRun`. - string job_run = 2; - - // Unique identifier of the `DeliveryPipeline`. - string pipeline_uid = 3; - - // Unique identifier of the `Release`. - string release_uid = 4; - - // Unique identifier of the `Rollout`. - string rollout_uid = 5; - - // ID of the `Target`. - string target_id = 6; - - // Type of this notification, e.g. for a Pub/Sub failure. - Type type = 7; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto deleted file mode 100644 index ab9dcb20913..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/log_enums.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "LogEnumsProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Type indicates the type of the log entry and can be used as a filter. -enum Type { - // Type is unspecified. - TYPE_UNSPECIFIED = 0; - - // A Pub/Sub notification failed to be sent. - TYPE_PUBSUB_NOTIFICATION_FAILURE = 1; - - // Resource state changed. - TYPE_RESOURCE_STATE_CHANGE = 3; - - // A process aborted. - TYPE_PROCESS_ABORTED = 4; - - // Restriction check failed. - TYPE_RESTRICTION_VIOLATED = 5; - - // Resource deleted. - TYPE_RESOURCE_DELETED = 6; - - // Rollout updated. - TYPE_ROLLOUT_UPDATE = 7; - - // Deprecated: This field is never used. Use release_render log type instead. - TYPE_RENDER_STATUES_CHANGE = 2 [deprecated = true]; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto deleted file mode 100644 index 6e0eb0d88bc..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_notification_payload.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -import "google/cloud/deploy/v1/log_enums.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "ReleaseNotificationPayloadProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Payload proto for "clouddeploy.googleapis.com/release_notification" -// Platform Log event that describes the failure to send release status change -// Pub/Sub notification. -message ReleaseNotificationEvent { - // Debug message for when a notification fails to send. - string message = 1; - - // The name of the `Release`. - string release = 2; - - // Type of this notification, e.g. for a Pub/Sub failure. - Type type = 3; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto deleted file mode 100644 index 0329689960a..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/release_render_payload.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -import "google/cloud/deploy/v1/cloud_deploy.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "ReleaseRenderPayloadProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Payload proto for "clouddeploy.googleapis.com/release_render" -// Platform Log event that describes the render status change. -message ReleaseRenderEvent { - // Debug message for when a render transition occurs. Provides further - // details as rendering progresses through render states. - string message = 1; - - // The name of the release. - string release = 2; - - // The state of the release render. - Release.RenderState release_render_state = 3; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto deleted file mode 100644 index 1aa3b687ab0..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_notification_payload.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -import "google/cloud/deploy/v1/log_enums.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "RolloutNotificationPayloadProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Payload proto for "clouddeploy.googleapis.com/rollout_notification" -// Platform Log event that describes the failure to send rollout status change -// Pub/Sub notification. -message RolloutNotificationEvent { - // Debug message for when a notification fails to send. - string message = 1; - - // Unique identifier of the `DeliveryPipeline`. - string pipeline_uid = 2; - - // Unique identifier of the `Release`. - string release_uid = 3; - - // The name of the `Rollout`. - string rollout = 4; - - // Type of this notification, e.g. for a Pub/Sub failure. - Type type = 5; - - // ID of the `Target` that the rollout is deployed to. - string target_id = 6; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto b/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto deleted file mode 100644 index d38df104c3c..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/target_notification_payload.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.deploy.v1; - -import "google/cloud/deploy/v1/log_enums.proto"; - -option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; -option java_multiple_files = true; -option java_outer_classname = "TargetNotificationPayloadProto"; -option java_package = "com.google.cloud.deploy.v1"; - -// Payload proto for "clouddeploy.googleapis.com/target_notification" -// Platform Log event that describes the failure to send target status change -// Pub/Sub notification. -message TargetNotificationEvent { - // Debug message for when a notification fails to send. - string message = 1; - - // The name of the `Target`. - string target = 2; - - // Type of this notification, e.g. for a Pub/Sub failure. - Type type = 3; -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js deleted file mode 100644 index cb791ed4624..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.abandon_release.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the Release. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callAbandonRelease() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.abandonRelease(request); - console.log(response); - } - - callAbandonRelease(); - // [END clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js deleted file mode 100644 index fcb09cd794f..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.advance_rollout.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, phaseId) { - // [START clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - */ - // const name = 'abc123' - /** - * Required. The phase ID to advance the `Rollout` to. - */ - // const phaseId = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callAdvanceRollout() { - // Construct request - const request = { - name, - phaseId, - }; - - // Run request - const response = await deployClient.advanceRollout(request); - console.log(response); - } - - callAdvanceRollout(); - // [END clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js deleted file mode 100644 index fa9cefda477..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.approve_rollout.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name, approved) { - // [START clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - */ - // const name = 'abc123' - /** - * Required. True = approve; false = reject - */ - // const approved = true - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callApproveRollout() { - // Construct request - const request = { - name, - approved, - }; - - // Run request - const response = await deployClient.approveRollout(request); - console.log(response); - } - - callApproveRollout(); - // [END clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js deleted file mode 100644 index 508ca9e2c60..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_rollout.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_CancelRollout_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callCancelRollout() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.cancelRollout(request); - console.log(response); - } - - callCancelRollout(); - // [END clouddeploy_v1_generated_CloudDeploy_CancelRollout_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js deleted file mode 100644 index bc35269a796..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, deliveryPipelineId, deliveryPipeline) { - // [START clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. - */ - // const parent = 'abc123' - /** - * Required. ID of the `DeliveryPipeline`. - */ - // const deliveryPipelineId = 'abc123' - /** - * Required. The `DeliveryPipeline` to create. - */ - // const deliveryPipeline = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - */ - // const validateOnly = true - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callCreateDeliveryPipeline() { - // Construct request - const request = { - parent, - deliveryPipelineId, - deliveryPipeline, - }; - - // Run request - const [operation] = await deployClient.createDeliveryPipeline(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateDeliveryPipeline(); - // [END clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js deleted file mode 100644 index 029f3c779c3..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_release.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, releaseId, release) { - // [START clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent collection in which the `Release` should be created. - * Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - */ - // const parent = 'abc123' - /** - * Required. ID of the `Release`. - */ - // const releaseId = 'abc123' - /** - * Required. The `Release` to create. - */ - // const release = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - */ - // const validateOnly = true - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callCreateRelease() { - // Construct request - const request = { - parent, - releaseId, - release, - }; - - // Run request - const [operation] = await deployClient.createRelease(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateRelease(); - // [END clouddeploy_v1_generated_CloudDeploy_CreateRelease_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js deleted file mode 100644 index 6a19b19f0e3..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_rollout.js +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, rolloutId, rollout) { - // [START clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent collection in which the `Rollout` should be created. - * Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. - */ - // const parent = 'abc123' - /** - * Required. ID of the `Rollout`. - */ - // const rolloutId = 'abc123' - /** - * Required. The `Rollout` to create. - */ - // const rollout = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - */ - // const validateOnly = true - /** - * Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` - * will start at the first phase. - */ - // const startingPhaseId = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callCreateRollout() { - // Construct request - const request = { - parent, - rolloutId, - rollout, - }; - - // Run request - const [operation] = await deployClient.createRollout(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateRollout(); - // [END clouddeploy_v1_generated_CloudDeploy_CreateRollout_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js deleted file mode 100644 index 8b9301f42df..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_target.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, targetId, target) { - // [START clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent collection in which the `Target` should be created. - * Format should be - * `projects/{project_id}/locations/{location_name}`. - */ - // const parent = 'abc123' - /** - * Required. ID of the `Target`. - */ - // const targetId = 'abc123' - /** - * Required. The `Target` to create. - */ - // const target = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - */ - // const validateOnly = true - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callCreateTarget() { - // Construct request - const request = { - parent, - targetId, - target, - }; - - // Run request - const [operation] = await deployClient.createTarget(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateTarget(); - // [END clouddeploy_v1_generated_CloudDeploy_CreateTarget_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js deleted file mode 100644 index 393e2c5f5f0..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the `DeliveryPipeline` to delete. Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, then deleting an already deleted or non-existing - * `DeliveryPipeline` will succeed. - */ - // const allowMissing = true - /** - * Optional. If set, validate the request and preview the review, but do not - * actually post it. - */ - // const validateOnly = true - /** - * Optional. If set to true, all child resources under this pipeline will also - * be deleted. Otherwise, the request will only work if the pipeline has no - * child resources. - */ - // const force = true - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - */ - // const etag = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callDeleteDeliveryPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await deployClient.deleteDeliveryPipeline(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteDeliveryPipeline(); - // [END clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js deleted file mode 100644 index ebe1b0cd306..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_target.js +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the `Target` to delete. Format should be - * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - */ - // const name = 'abc123' - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, then deleting an already deleted or non-existing - * `Target` will succeed. - */ - // const allowMissing = true - /** - * Optional. If set, validate the request and preview the review, but do not - * actually post it. - */ - // const validateOnly = true - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - */ - // const etag = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callDeleteTarget() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await deployClient.deleteTarget(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteTarget(); - // [END clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js deleted file mode 100644 index bd84d495150..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_config.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_GetConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of requested configuration. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callGetConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.getConfig(request); - console.log(response); - } - - callGetConfig(); - // [END clouddeploy_v1_generated_CloudDeploy_GetConfig_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js deleted file mode 100644 index 630419ae016..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the `DeliveryPipeline`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callGetDeliveryPipeline() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.getDeliveryPipeline(request); - console.log(response); - } - - callGetDeliveryPipeline(); - // [END clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js deleted file mode 100644 index ffb17d2e3d1..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_job_run.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_GetJobRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the `JobRun`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callGetJobRun() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.getJobRun(request); - console.log(response); - } - - callGetJobRun(); - // [END clouddeploy_v1_generated_CloudDeploy_GetJobRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js deleted file mode 100644 index b005ec93c94..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_release.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_GetRelease_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the `Release`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callGetRelease() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.getRelease(request); - console.log(response); - } - - callGetRelease(); - // [END clouddeploy_v1_generated_CloudDeploy_GetRelease_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js deleted file mode 100644 index 37c79053a1c..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_rollout.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_GetRollout_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the `Rollout`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callGetRollout() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.getRollout(request); - console.log(response); - } - - callGetRollout(); - // [END clouddeploy_v1_generated_CloudDeploy_GetRollout_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js deleted file mode 100644 index 89aa9d69099..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_target.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_GetTarget_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the `Target`. Format must be - * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callGetTarget() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.getTarget(request); - console.log(response); - } - - callGetTarget(); - // [END clouddeploy_v1_generated_CloudDeploy_GetTarget_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js deleted file mode 100644 index 293719eacfc..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.ignore_job.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(rollout, phaseId, jobId) { - // [START clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - */ - // const rollout = 'abc123' - /** - * Required. The phase ID the Job to ignore belongs to. - */ - // const phaseId = 'abc123' - /** - * Required. The job ID for the Job to ignore. - */ - // const jobId = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callIgnoreJob() { - // Construct request - const request = { - rollout, - phaseId, - jobId, - }; - - // Run request - const response = await deployClient.ignoreJob(request); - console.log(response); - } - - callIgnoreJob(); - // [END clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js deleted file mode 100644 index 1aa20694935..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent, which owns this collection of pipelines. Format must - * be `projects/{project_id}/locations/{location_name}`. - */ - // const parent = 'abc123' - /** - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - */ - // const pageSize = 1234 - /** - * A page token, received from a previous `ListDeliveryPipelines` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters match - * the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - */ - // const filter = 'abc123' - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - */ - // const orderBy = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callListDeliveryPipelines() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await deployClient.listDeliveryPipelinesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDeliveryPipelines(); - // [END clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js deleted file mode 100644 index d09b36df445..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_job_runs.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The `Rollout` which owns this collection of `JobRun` objects. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListJobRuns` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters match the call that provided - * the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - */ - // const filter = 'abc123' - /** - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - */ - // const orderBy = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callListJobRuns() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await deployClient.listJobRunsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListJobRuns(); - // [END clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js deleted file mode 100644 index 8efacd4044c..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_releases.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START clouddeploy_v1_generated_CloudDeploy_ListReleases_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The `DeliveryPipeline` which owns this collection of `Release` - * objects. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListReleases` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters match - * the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. - */ - // const filter = 'abc123' - /** - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - */ - // const orderBy = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callListReleases() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await deployClient.listReleasesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListReleases(); - // [END clouddeploy_v1_generated_CloudDeploy_ListReleases_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js deleted file mode 100644 index 77ba2a156b5..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_rollouts.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The `Release` which owns this collection of `Rollout` objects. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListRollouts` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters match - * the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - */ - // const filter = 'abc123' - /** - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - */ - // const orderBy = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callListRollouts() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await deployClient.listRolloutsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListRollouts(); - // [END clouddeploy_v1_generated_CloudDeploy_ListRollouts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js deleted file mode 100644 index e09c307fcfc..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_targets.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START clouddeploy_v1_generated_CloudDeploy_ListTargets_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent, which owns this collection of targets. Format must be - * `projects/{project_id}/locations/{location_name}`. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other provided parameters match - * the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. - */ - // const filter = 'abc123' - /** - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - */ - // const orderBy = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callListTargets() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await deployClient.listTargetsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTargets(); - // [END clouddeploy_v1_generated_CloudDeploy_ListTargets_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js deleted file mode 100644 index c87a3d0d591..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.retry_job.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(rollout, phaseId, jobId) { - // [START clouddeploy_v1_generated_CloudDeploy_RetryJob_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - */ - // const rollout = 'abc123' - /** - * Required. The phase ID the Job to retry belongs to. - */ - // const phaseId = 'abc123' - /** - * Required. The job ID for the Job to retry. - */ - // const jobId = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callRetryJob() { - // Construct request - const request = { - rollout, - phaseId, - jobId, - }; - - // Run request - const response = await deployClient.retryJob(request); - console.log(response); - } - - callRetryJob(); - // [END clouddeploy_v1_generated_CloudDeploy_RetryJob_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js deleted file mode 100644 index 3158a5f54ac..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.terminate_job_run.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the `JobRun`. Format must be - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. - */ - // const name = 'abc123' - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callTerminateJobRun() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await deployClient.terminateJobRun(request); - console.log(response); - } - - callTerminateJobRun(); - // [END clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js deleted file mode 100644 index 131f075e6dd..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, deliveryPipeline) { - // [START clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeliveryPipeline` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. The `DeliveryPipeline` to update. - */ - // const deliveryPipeline = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, updating a `DeliveryPipeline` that does not exist - * will result in the creation of a new `DeliveryPipeline`. - */ - // const allowMissing = true - /** - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - */ - // const validateOnly = true - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callUpdateDeliveryPipeline() { - // Construct request - const request = { - updateMask, - deliveryPipeline, - }; - - // Run request - const [operation] = await deployClient.updateDeliveryPipeline(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDeliveryPipeline(); - // [END clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js deleted file mode 100644 index c53850189bb..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_target.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(updateMask, target) { - // [START clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Target resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - */ - // const updateMask = {} - /** - * Required. The `Target` to update. - */ - // const target = {} - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - */ - // const requestId = 'abc123' - /** - * Optional. If set to true, updating a `Target` that does not exist will - * result in the creation of a new `Target`. - */ - // const allowMissing = true - /** - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - */ - // const validateOnly = true - - // Imports the Deploy library - const {CloudDeployClient} = require('@google-cloud/deploy').v1; - - // Instantiates a client - const deployClient = new CloudDeployClient(); - - async function callUpdateTarget() { - // Construct request - const request = { - updateMask, - target, - }; - - // Run request - const [operation] = await deployClient.updateTarget(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateTarget(); - // [END clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json b/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json deleted file mode 100644 index bd2a8cff8e4..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json +++ /dev/null @@ -1,1759 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-deploy", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.deploy.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async", - "title": "CloudDeploy listDeliveryPipelines Sample", - "origin": "API_DEFINITION", - "description": " Lists DeliveryPipelines in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_delivery_pipelines.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDeliveryPipelines", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListDeliveryPipelinesResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListDeliveryPipelines", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelines", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async", - "title": "CloudDeploy getDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single DeliveryPipeline.", - "canonical": true, - "file": "cloud_deploy.get_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.DeliveryPipeline", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async", - "title": "CloudDeploy createDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Creates a new DeliveryPipeline in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "delivery_pipeline_id", - "type": "TYPE_STRING" - }, - { - "name": "delivery_pipeline", - "type": ".google.cloud.deploy.v1.DeliveryPipeline" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CreateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async", - "title": "CloudDeploy updateDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single DeliveryPipeline.", - "canonical": true, - "file": "cloud_deploy.update_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "delivery_pipeline", - "type": ".google.cloud.deploy.v1.DeliveryPipeline" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "UpdateDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async", - "title": "CloudDeploy deleteDeliveryPipeline Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single DeliveryPipeline.", - "canonical": true, - "file": "cloud_deploy.delete_delivery_pipeline.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "DeleteDeliveryPipeline", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipeline", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListTargets_async", - "title": "CloudDeploy listTargets Sample", - "origin": "API_DEFINITION", - "description": " Lists Targets in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_targets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTargets", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListTargetsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListTargets", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListTargets", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async", - "title": "CloudDeploy rollbackTarget Sample", - "origin": "API_DEFINITION", - "description": " Creates a `Rollout` to roll back the specified target.", - "canonical": true, - "file": "cloud_deploy.rollback_target.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RollbackTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "target_id", - "type": "TYPE_STRING" - }, - { - "name": "rollout_id", - "type": "TYPE_STRING" - }, - { - "name": "release_id", - "type": "TYPE_STRING" - }, - { - "name": "rollout_to_roll_back", - "type": "TYPE_STRING" - }, - { - "name": "rollback_config", - "type": ".google.cloud.deploy.v1.RollbackTargetConfig" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.deploy.v1.RollbackTargetResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "RollbackTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetTarget_async", - "title": "CloudDeploy getTarget Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Target.", - "canonical": true, - "file": "cloud_deploy.get_target.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Target", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateTarget_async", - "title": "CloudDeploy createTarget Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Target in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_target.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "target_id", - "type": "TYPE_STRING" - }, - { - "name": "target", - "type": ".google.cloud.deploy.v1.Target" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CreateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async", - "title": "CloudDeploy updateTarget Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Target.", - "canonical": true, - "file": "cloud_deploy.update_target.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "target", - "type": ".google.cloud.deploy.v1.Target" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "UpdateTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async", - "title": "CloudDeploy deleteTarget Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Target.", - "canonical": true, - "file": "cloud_deploy.delete_target.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "DeleteTarget", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteTarget", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListReleases_async", - "title": "CloudDeploy listReleases Sample", - "origin": "API_DEFINITION", - "description": " Lists Releases in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_releases.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListReleases", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListReleasesResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListReleases", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListReleases", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRelease_async", - "title": "CloudDeploy getRelease Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Release.", - "canonical": true, - "file": "cloud_deploy.get_release.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Release", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRelease", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRelease_async", - "title": "CloudDeploy createRelease Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Release in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_release.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "release_id", - "type": "TYPE_STRING" - }, - { - "name": "release", - "type": ".google.cloud.deploy.v1.Release" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CreateRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRelease", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async", - "title": "CloudDeploy abandonRelease Sample", - "origin": "API_DEFINITION", - "description": " Abandons a Release in the Delivery Pipeline.", - "canonical": true, - "file": "cloud_deploy.abandon_release.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AbandonRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.AbandonRelease", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.AbandonReleaseResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "AbandonRelease", - "fullName": "google.cloud.deploy.v1.CloudDeploy.AbandonRelease", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async", - "title": "CloudDeploy approveRollout Sample", - "origin": "API_DEFINITION", - "description": " Approves a Rollout.", - "canonical": true, - "file": "cloud_deploy.approve_rollout.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ApproveRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "approved", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.deploy.v1.ApproveRolloutResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ApproveRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ApproveRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async", - "title": "CloudDeploy advanceRollout Sample", - "origin": "API_DEFINITION", - "description": " Advances a Rollout in a given project and location.", - "canonical": true, - "file": "cloud_deploy.advance_rollout.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AdvanceRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.AdvanceRollout", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "phase_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.AdvanceRolloutResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "AdvanceRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.AdvanceRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CancelRollout_async", - "title": "CloudDeploy cancelRollout Sample", - "origin": "API_DEFINITION", - "description": " Cancels a Rollout in a given project and location.", - "canonical": true, - "file": "cloud_deploy.cancel_rollout.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelRollout", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.CancelRolloutResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CancelRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListRollouts_async", - "title": "CloudDeploy listRollouts Sample", - "origin": "API_DEFINITION", - "description": " Lists Rollouts in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_rollouts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListRollouts", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListRolloutsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListRollouts", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListRollouts", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetRollout_async", - "title": "CloudDeploy getRollout Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Rollout.", - "canonical": true, - "file": "cloud_deploy.get_rollout.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Rollout", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateRollout_async", - "title": "CloudDeploy createRollout Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Rollout in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_rollout.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 90, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "rollout_id", - "type": "TYPE_STRING" - }, - { - "name": "rollout", - "type": ".google.cloud.deploy.v1.Rollout" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "starting_phase_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CreateRollout", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateRollout", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async", - "title": "CloudDeploy ignoreJob Sample", - "origin": "API_DEFINITION", - "description": " Ignores the specified Job in a Rollout.", - "canonical": true, - "file": "cloud_deploy.ignore_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "IgnoreJob", - "fullName": "google.cloud.deploy.v1.CloudDeploy.IgnoreJob", - "async": true, - "parameters": [ - { - "name": "rollout", - "type": "TYPE_STRING" - }, - { - "name": "phase_id", - "type": "TYPE_STRING" - }, - { - "name": "job_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.IgnoreJobResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "IgnoreJob", - "fullName": "google.cloud.deploy.v1.CloudDeploy.IgnoreJob", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_RetryJob_async", - "title": "CloudDeploy retryJob Sample", - "origin": "API_DEFINITION", - "description": " Retries the specified Job in a Rollout.", - "canonical": true, - "file": "cloud_deploy.retry_job.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RetryJob", - "fullName": "google.cloud.deploy.v1.CloudDeploy.RetryJob", - "async": true, - "parameters": [ - { - "name": "rollout", - "type": "TYPE_STRING" - }, - { - "name": "phase_id", - "type": "TYPE_STRING" - }, - { - "name": "job_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.RetryJobResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "RetryJob", - "fullName": "google.cloud.deploy.v1.CloudDeploy.RetryJob", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async", - "title": "CloudDeploy listJobRuns Sample", - "origin": "API_DEFINITION", - "description": " Lists JobRuns in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_job_runs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListJobRuns", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListJobRuns", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListJobRunsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListJobRuns", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListJobRuns", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetJobRun_async", - "title": "CloudDeploy getJobRun Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single JobRun.", - "canonical": true, - "file": "cloud_deploy.get_job_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetJobRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetJobRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.JobRun", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetJobRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetJobRun", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async", - "title": "CloudDeploy terminateJobRun Sample", - "origin": "API_DEFINITION", - "description": " Terminates a Job Run in a given project and location.", - "canonical": true, - "file": "cloud_deploy.terminate_job_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TerminateJobRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.TerminateJobRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.TerminateJobRunResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "TerminateJobRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.TerminateJobRun", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetConfig_async", - "title": "CloudDeploy getConfig Sample", - "origin": "API_DEFINITION", - "description": " Gets the configuration for a location.", - "canonical": true, - "file": "cloud_deploy.get_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConfig", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Config", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetConfig", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetConfig", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async", - "title": "CloudDeploy createAutomation Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Automation in a given project and location.", - "canonical": true, - "file": "cloud_deploy.create_automation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "automation_id", - "type": "TYPE_STRING" - }, - { - "name": "automation", - "type": ".google.cloud.deploy.v1.Automation" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CreateAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async", - "title": "CloudDeploy updateAutomation Sample", - "origin": "API_DEFINITION", - "description": " Updates the parameters of a single Automation resource.", - "canonical": true, - "file": "cloud_deploy.update_automation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "automation", - "type": ".google.cloud.deploy.v1.Automation" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "UpdateAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async", - "title": "CloudDeploy deleteAutomation Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single Automation resource.", - "canonical": true, - "file": "cloud_deploy.delete_automation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 86, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "DeleteAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetAutomation_async", - "title": "CloudDeploy getAutomation Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single Automation.", - "canonical": true, - "file": "cloud_deploy.get_automation.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.Automation", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetAutomation", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListAutomations_async", - "title": "CloudDeploy listAutomations Sample", - "origin": "API_DEFINITION", - "description": " Lists Automations in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_automations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAutomations", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListAutomationsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListAutomations", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async", - "title": "CloudDeploy getAutomationRun Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single AutomationRun.", - "canonical": true, - "file": "cloud_deploy.get_automation_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetAutomationRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.AutomationRun", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "GetAutomationRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async", - "title": "CloudDeploy listAutomationRuns Sample", - "origin": "API_DEFINITION", - "description": " Lists AutomationRuns in a given project and location.", - "canonical": true, - "file": "cloud_deploy.list_automation_runs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListAutomationRuns", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.ListAutomationRunsResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "ListAutomationRuns", - "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - }, - { - "regionTag": "clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async", - "title": "CloudDeploy cancelAutomationRun Sample", - "origin": "API_DEFINITION", - "description": " Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun in a different state returns an `FAILED_PRECONDITION` error.", - "canonical": true, - "file": "cloud_deploy.cancel_automation_run.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelAutomationRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.deploy.v1.CancelAutomationRunResponse", - "client": { - "shortName": "CloudDeployClient", - "fullName": "google.cloud.deploy.v1.CloudDeployClient" - }, - "method": { - "shortName": "CancelAutomationRun", - "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", - "service": { - "shortName": "CloudDeploy", - "fullName": "google.cloud.deploy.v1.CloudDeploy" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/index.ts b/owl-bot-staging/google-cloud-deploy/v1/src/index.ts deleted file mode 100644 index dbeccc4a958..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -const CloudDeployClient = v1.CloudDeployClient; -type CloudDeployClient = v1.CloudDeployClient; -export {v1, CloudDeployClient}; -export default {v1, CloudDeployClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts deleted file mode 100644 index 190767619de..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client.ts +++ /dev/null @@ -1,5703 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1/cloud_deploy_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './cloud_deploy_client_config.json'; -const version = require('../../../package.json').version; - -/** - * CloudDeploy service creates and manages Continuous Delivery operations - * on Google Cloud Platform via Skaffold (https://skaffold.dev). - * @class - * @memberof v1 - */ -export class CloudDeployClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - iamClient: IamClient; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - cloudDeployStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of CloudDeployClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new CloudDeployClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof CloudDeployClient; - const servicePath = opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - - this.locationsClient = new this._gaxModule.LocationsClient( - this._gaxGrpc, - opts - ); - - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - automationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}' - ), - automationRunPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}' - ), - buildPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/builds/{build}' - ), - clusterPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/clusters/{cluster}' - ), - configPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/config' - ), - deliveryPipelinePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}' - ), - jobPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/jobs/{job}' - ), - jobRunPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - membershipPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/memberships/{membership}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - releasePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}' - ), - rolloutPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}' - ), - servicePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/services/{service}' - ), - targetPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/targets/{target}' - ), - workerPoolPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workerPools/{worker_pool}' - ), - }; - - // 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 = { - listDeliveryPipelines: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deliveryPipelines'), - listTargets: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targets'), - listReleases: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'releases'), - listRollouts: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rollouts'), - listJobRuns: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobRuns'), - listAutomations: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'automations'), - listAutomationRuns: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'automationRuns') - }; - - 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) { - lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:getIamPolicy',additional_bindings: [{get: '/v1/{resource=projects/*/locations/*/targets/*}:getIamPolicy',}], - },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/targets/*}:setIamPolicy',body: '*',}], - },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1/{resource=projects/*/locations/*/targets/*}:testIamPermissions',body: '*',}], - },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createDeliveryPipelineResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.DeliveryPipeline') as gax.protobuf.Type; - const createDeliveryPipelineMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const updateDeliveryPipelineResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.DeliveryPipeline') as gax.protobuf.Type; - const updateDeliveryPipelineMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const deleteDeliveryPipelineResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteDeliveryPipelineMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const createTargetResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.Target') as gax.protobuf.Type; - const createTargetMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const updateTargetResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.Target') as gax.protobuf.Type; - const updateTargetMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const deleteTargetResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteTargetMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const createReleaseResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.Release') as gax.protobuf.Type; - const createReleaseMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const createRolloutResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.Rollout') as gax.protobuf.Type; - const createRolloutMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const createAutomationResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.Automation') as gax.protobuf.Type; - const createAutomationMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const updateAutomationResponse = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.Automation') as gax.protobuf.Type; - const updateAutomationMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - const deleteAutomationResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteAutomationMetadata = protoFilesRoot.lookup( - '.google.cloud.deploy.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createDeliveryPipelineResponse.decode.bind(createDeliveryPipelineResponse), - createDeliveryPipelineMetadata.decode.bind(createDeliveryPipelineMetadata)), - updateDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDeliveryPipelineResponse.decode.bind(updateDeliveryPipelineResponse), - updateDeliveryPipelineMetadata.decode.bind(updateDeliveryPipelineMetadata)), - deleteDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteDeliveryPipelineResponse.decode.bind(deleteDeliveryPipelineResponse), - deleteDeliveryPipelineMetadata.decode.bind(deleteDeliveryPipelineMetadata)), - createTarget: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createTargetResponse.decode.bind(createTargetResponse), - createTargetMetadata.decode.bind(createTargetMetadata)), - updateTarget: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateTargetResponse.decode.bind(updateTargetResponse), - updateTargetMetadata.decode.bind(updateTargetMetadata)), - deleteTarget: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteTargetResponse.decode.bind(deleteTargetResponse), - deleteTargetMetadata.decode.bind(deleteTargetMetadata)), - createRelease: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createReleaseResponse.decode.bind(createReleaseResponse), - createReleaseMetadata.decode.bind(createReleaseMetadata)), - createRollout: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createRolloutResponse.decode.bind(createRolloutResponse), - createRolloutMetadata.decode.bind(createRolloutMetadata)), - createAutomation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createAutomationResponse.decode.bind(createAutomationResponse), - createAutomationMetadata.decode.bind(createAutomationMetadata)), - updateAutomation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateAutomationResponse.decode.bind(updateAutomationResponse), - updateAutomationMetadata.decode.bind(updateAutomationMetadata)), - deleteAutomation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteAutomationResponse.decode.bind(deleteAutomationResponse), - deleteAutomationMetadata.decode.bind(deleteAutomationMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.deploy.v1.CloudDeploy', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.cloudDeployStub) { - return this.cloudDeployStub; - } - - // Put together the "service stub" for - // google.cloud.deploy.v1.CloudDeploy. - this.cloudDeployStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.deploy.v1.CloudDeploy') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.deploy.v1.CloudDeploy, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const cloudDeployStubMethods = - ['listDeliveryPipelines', 'getDeliveryPipeline', 'createDeliveryPipeline', 'updateDeliveryPipeline', 'deleteDeliveryPipeline', 'listTargets', 'rollbackTarget', 'getTarget', 'createTarget', 'updateTarget', 'deleteTarget', 'listReleases', 'getRelease', 'createRelease', 'abandonRelease', 'approveRollout', 'advanceRollout', 'cancelRollout', 'listRollouts', 'getRollout', 'createRollout', 'ignoreJob', 'retryJob', 'listJobRuns', 'getJobRun', 'terminateJobRun', 'getConfig', 'createAutomation', 'updateAutomation', 'deleteAutomation', 'getAutomation', 'listAutomations', 'getAutomationRun', 'listAutomationRuns', 'cancelAutomationRun']; - for (const methodName of cloudDeployStubMethods) { - const callPromise = this.cloudDeployStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - this.descriptors.longrunning[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.cloudDeployStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'clouddeploy.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'clouddeploy.googleapis.com'; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Gets details of a single DeliveryPipeline. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `DeliveryPipeline`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetDeliveryPipeline_async - */ - getDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|undefined, {}|undefined - ]>; - getDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, - {}|null|undefined>): void; - getDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, - {}|null|undefined>): void; - getDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IGetDeliveryPipelineRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getDeliveryPipeline(request, options, callback); - } -/** - * Creates a `Rollout` to roll back the specified target. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {string} request.targetId - * Required. ID of the `Target` that is being rolled back. - * @param {string} request.rolloutId - * Required. ID of the rollback `Rollout` to create. - * @param {string} [request.releaseId] - * Optional. ID of the `Release` to roll back to. If this isn't specified, the - * previous successful `Rollout` to the specified target will be used to - * determine the `Release`. - * @param {string} [request.rolloutToRollBack] - * Optional. If provided, this must be the latest `Rollout` that is on the - * `Target`. - * @param {google.cloud.deploy.v1.RollbackTargetConfig} [request.rollbackConfig] - * Optional. Configs for the rollback `Rollout`. - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with a `RollbackTargetResponse`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.RollbackTargetResponse|RollbackTargetResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.rollback_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async - */ - rollbackTarget( - request?: protos.google.cloud.deploy.v1.IRollbackTargetRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IRollbackTargetResponse, - protos.google.cloud.deploy.v1.IRollbackTargetRequest|undefined, {}|undefined - ]>; - rollbackTarget( - request: protos.google.cloud.deploy.v1.IRollbackTargetRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IRollbackTargetResponse, - protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, - {}|null|undefined>): void; - rollbackTarget( - request: protos.google.cloud.deploy.v1.IRollbackTargetRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IRollbackTargetResponse, - protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, - {}|null|undefined>): void; - rollbackTarget( - request?: protos.google.cloud.deploy.v1.IRollbackTargetRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IRollbackTargetResponse, - protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IRollbackTargetResponse, - protos.google.cloud.deploy.v1.IRollbackTargetRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IRollbackTargetResponse, - protos.google.cloud.deploy.v1.IRollbackTargetRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.rollbackTarget(request, options, callback); - } -/** - * Gets details of a single Target. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Target`. Format must be - * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Target|Target}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetTarget_async - */ - getTarget( - request?: protos.google.cloud.deploy.v1.IGetTargetRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IGetTargetRequest|undefined, {}|undefined - ]>; - getTarget( - request: protos.google.cloud.deploy.v1.IGetTargetRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, - {}|null|undefined>): void; - getTarget( - request: protos.google.cloud.deploy.v1.IGetTargetRequest, - callback: Callback< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, - {}|null|undefined>): void; - getTarget( - request?: protos.google.cloud.deploy.v1.IGetTargetRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IGetTargetRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.ITarget, - protos.google.cloud.deploy.v1.IGetTargetRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getTarget(request, options, callback); - } -/** - * Gets details of a single Release. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Release`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Release|Release}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_release.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetRelease_async - */ - getRelease( - request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IGetReleaseRequest|undefined, {}|undefined - ]>; - getRelease( - request: protos.google.cloud.deploy.v1.IGetReleaseRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, - {}|null|undefined>): void; - getRelease( - request: protos.google.cloud.deploy.v1.IGetReleaseRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, - {}|null|undefined>): void; - getRelease( - request?: protos.google.cloud.deploy.v1.IGetReleaseRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IGetReleaseRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IRelease, - protos.google.cloud.deploy.v1.IGetReleaseRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getRelease(request, options, callback); - } -/** - * Abandons a Release in the Delivery Pipeline. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the Release. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AbandonReleaseResponse|AbandonReleaseResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.abandon_release.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_AbandonRelease_async - */ - abandonRelease( - request?: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IAbandonReleaseResponse, - protos.google.cloud.deploy.v1.IAbandonReleaseRequest|undefined, {}|undefined - ]>; - abandonRelease( - request: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IAbandonReleaseResponse, - protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, - {}|null|undefined>): void; - abandonRelease( - request: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IAbandonReleaseResponse, - protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, - {}|null|undefined>): void; - abandonRelease( - request?: protos.google.cloud.deploy.v1.IAbandonReleaseRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IAbandonReleaseResponse, - protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IAbandonReleaseResponse, - protos.google.cloud.deploy.v1.IAbandonReleaseRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IAbandonReleaseResponse, - protos.google.cloud.deploy.v1.IAbandonReleaseRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.abandonRelease(request, options, callback); - } -/** - * Approves a Rollout. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - * @param {boolean} request.approved - * Required. True = approve; false = reject - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.ApproveRolloutResponse|ApproveRolloutResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.approve_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ApproveRollout_async - */ - approveRollout( - request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IApproveRolloutResponse, - protos.google.cloud.deploy.v1.IApproveRolloutRequest|undefined, {}|undefined - ]>; - approveRollout( - request: protos.google.cloud.deploy.v1.IApproveRolloutRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IApproveRolloutResponse, - protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, - {}|null|undefined>): void; - approveRollout( - request: protos.google.cloud.deploy.v1.IApproveRolloutRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IApproveRolloutResponse, - protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, - {}|null|undefined>): void; - approveRollout( - request?: protos.google.cloud.deploy.v1.IApproveRolloutRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IApproveRolloutResponse, - protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IApproveRolloutResponse, - protos.google.cloud.deploy.v1.IApproveRolloutRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IApproveRolloutResponse, - protos.google.cloud.deploy.v1.IApproveRolloutRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.approveRollout(request, options, callback); - } -/** - * Advances a Rollout in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - * @param {string} request.phaseId - * Required. The phase ID to advance the `Rollout` to. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AdvanceRolloutResponse|AdvanceRolloutResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.advance_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_AdvanceRollout_async - */ - advanceRollout( - request?: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, - protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|undefined, {}|undefined - ]>; - advanceRollout( - request: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, - protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, - {}|null|undefined>): void; - advanceRollout( - request: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, - protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, - {}|null|undefined>): void; - advanceRollout( - request?: protos.google.cloud.deploy.v1.IAdvanceRolloutRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, - protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, - protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IAdvanceRolloutResponse, - protos.google.cloud.deploy.v1.IAdvanceRolloutRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.advanceRollout(request, options, callback); - } -/** - * Cancels a Rollout in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.CancelRolloutResponse|CancelRolloutResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.cancel_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CancelRollout_async - */ - cancelRollout( - request?: protos.google.cloud.deploy.v1.ICancelRolloutRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.ICancelRolloutResponse, - protos.google.cloud.deploy.v1.ICancelRolloutRequest|undefined, {}|undefined - ]>; - cancelRollout( - request: protos.google.cloud.deploy.v1.ICancelRolloutRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.ICancelRolloutResponse, - protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, - {}|null|undefined>): void; - cancelRollout( - request: protos.google.cloud.deploy.v1.ICancelRolloutRequest, - callback: Callback< - protos.google.cloud.deploy.v1.ICancelRolloutResponse, - protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, - {}|null|undefined>): void; - cancelRollout( - request?: protos.google.cloud.deploy.v1.ICancelRolloutRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.ICancelRolloutResponse, - protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.ICancelRolloutResponse, - protos.google.cloud.deploy.v1.ICancelRolloutRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.ICancelRolloutResponse, - protos.google.cloud.deploy.v1.ICancelRolloutRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.cancelRollout(request, options, callback); - } -/** - * Gets details of a single Rollout. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Rollout`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetRollout_async - */ - getRollout( - request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IGetRolloutRequest|undefined, {}|undefined - ]>; - getRollout( - request: protos.google.cloud.deploy.v1.IGetRolloutRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, - {}|null|undefined>): void; - getRollout( - request: protos.google.cloud.deploy.v1.IGetRolloutRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, - {}|null|undefined>): void; - getRollout( - request?: protos.google.cloud.deploy.v1.IGetRolloutRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IGetRolloutRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IRollout, - protos.google.cloud.deploy.v1.IGetRolloutRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getRollout(request, options, callback); - } -/** - * Ignores the specified Job in a Rollout. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.rollout - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - * @param {string} request.phaseId - * Required. The phase ID the Job to ignore belongs to. - * @param {string} request.jobId - * Required. The job ID for the Job to ignore. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.IgnoreJobResponse|IgnoreJobResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.ignore_job.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_IgnoreJob_async - */ - ignoreJob( - request?: protos.google.cloud.deploy.v1.IIgnoreJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IIgnoreJobResponse, - protos.google.cloud.deploy.v1.IIgnoreJobRequest|undefined, {}|undefined - ]>; - ignoreJob( - request: protos.google.cloud.deploy.v1.IIgnoreJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IIgnoreJobResponse, - protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, - {}|null|undefined>): void; - ignoreJob( - request: protos.google.cloud.deploy.v1.IIgnoreJobRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IIgnoreJobResponse, - protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, - {}|null|undefined>): void; - ignoreJob( - request?: protos.google.cloud.deploy.v1.IIgnoreJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IIgnoreJobResponse, - protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IIgnoreJobResponse, - protos.google.cloud.deploy.v1.IIgnoreJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IIgnoreJobResponse, - protos.google.cloud.deploy.v1.IIgnoreJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'rollout': request.rollout ?? '', - }); - this.initialize(); - return this.innerApiCalls.ignoreJob(request, options, callback); - } -/** - * Retries the specified Job in a Rollout. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.rollout - * Required. Name of the Rollout. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. - * @param {string} request.phaseId - * Required. The phase ID the Job to retry belongs to. - * @param {string} request.jobId - * Required. The job ID for the Job to retry. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.RetryJobResponse|RetryJobResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.retry_job.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_RetryJob_async - */ - retryJob( - request?: protos.google.cloud.deploy.v1.IRetryJobRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IRetryJobResponse, - protos.google.cloud.deploy.v1.IRetryJobRequest|undefined, {}|undefined - ]>; - retryJob( - request: protos.google.cloud.deploy.v1.IRetryJobRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IRetryJobResponse, - protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, - {}|null|undefined>): void; - retryJob( - request: protos.google.cloud.deploy.v1.IRetryJobRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IRetryJobResponse, - protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, - {}|null|undefined>): void; - retryJob( - request?: protos.google.cloud.deploy.v1.IRetryJobRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IRetryJobResponse, - protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IRetryJobResponse, - protos.google.cloud.deploy.v1.IRetryJobRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IRetryJobResponse, - protos.google.cloud.deploy.v1.IRetryJobRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'rollout': request.rollout ?? '', - }); - this.initialize(); - return this.innerApiCalls.retryJob(request, options, callback); - } -/** - * Gets details of a single JobRun. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `JobRun`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_job_run.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetJobRun_async - */ - getJobRun( - request?: protos.google.cloud.deploy.v1.IGetJobRunRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IJobRun, - protos.google.cloud.deploy.v1.IGetJobRunRequest|undefined, {}|undefined - ]>; - getJobRun( - request: protos.google.cloud.deploy.v1.IGetJobRunRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IJobRun, - protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, - {}|null|undefined>): void; - getJobRun( - request: protos.google.cloud.deploy.v1.IGetJobRunRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IJobRun, - protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, - {}|null|undefined>): void; - getJobRun( - request?: protos.google.cloud.deploy.v1.IGetJobRunRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IJobRun, - protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IJobRun, - protos.google.cloud.deploy.v1.IGetJobRunRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IJobRun, - protos.google.cloud.deploy.v1.IGetJobRunRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getJobRun(request, options, callback); - } -/** - * Terminates a Job Run in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `JobRun`. Format must be - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.TerminateJobRunResponse|TerminateJobRunResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.terminate_job_run.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_TerminateJobRun_async - */ - terminateJobRun( - request?: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.ITerminateJobRunResponse, - protos.google.cloud.deploy.v1.ITerminateJobRunRequest|undefined, {}|undefined - ]>; - terminateJobRun( - request: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.ITerminateJobRunResponse, - protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, - {}|null|undefined>): void; - terminateJobRun( - request: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, - callback: Callback< - protos.google.cloud.deploy.v1.ITerminateJobRunResponse, - protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, - {}|null|undefined>): void; - terminateJobRun( - request?: protos.google.cloud.deploy.v1.ITerminateJobRunRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.ITerminateJobRunResponse, - protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.ITerminateJobRunResponse, - protos.google.cloud.deploy.v1.ITerminateJobRunRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.ITerminateJobRunResponse, - protos.google.cloud.deploy.v1.ITerminateJobRunRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.terminateJobRun(request, options, callback); - } -/** - * Gets the configuration for a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of requested configuration. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Config|Config}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_config.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetConfig_async - */ - getConfig( - request?: protos.google.cloud.deploy.v1.IGetConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IConfig, - protos.google.cloud.deploy.v1.IGetConfigRequest|undefined, {}|undefined - ]>; - getConfig( - request: protos.google.cloud.deploy.v1.IGetConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IConfig, - protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, - {}|null|undefined>): void; - getConfig( - request: protos.google.cloud.deploy.v1.IGetConfigRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IConfig, - protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, - {}|null|undefined>): void; - getConfig( - request?: protos.google.cloud.deploy.v1.IGetConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IConfig, - protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IConfig, - protos.google.cloud.deploy.v1.IGetConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IConfig, - protos.google.cloud.deploy.v1.IGetConfigRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getConfig(request, options, callback); - } -/** - * Gets details of a single Automation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `Automation`. Format must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Automation|Automation}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetAutomation_async - */ - getAutomation( - request?: protos.google.cloud.deploy.v1.IGetAutomationRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IAutomation, - protos.google.cloud.deploy.v1.IGetAutomationRequest|undefined, {}|undefined - ]>; - getAutomation( - request: protos.google.cloud.deploy.v1.IGetAutomationRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IAutomation, - protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, - {}|null|undefined>): void; - getAutomation( - request: protos.google.cloud.deploy.v1.IGetAutomationRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IAutomation, - protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, - {}|null|undefined>): void; - getAutomation( - request?: protos.google.cloud.deploy.v1.IGetAutomationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IAutomation, - protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IAutomation, - protos.google.cloud.deploy.v1.IGetAutomationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IAutomation, - protos.google.cloud.deploy.v1.IGetAutomationRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getAutomation(request, options, callback); - } -/** - * Gets details of a single AutomationRun. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `AutomationRun`. Format must be - * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.get_automation_run.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async - */ - getAutomationRun( - request?: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IAutomationRun, - protos.google.cloud.deploy.v1.IGetAutomationRunRequest|undefined, {}|undefined - ]>; - getAutomationRun( - request: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.IAutomationRun, - protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, - {}|null|undefined>): void; - getAutomationRun( - request: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, - callback: Callback< - protos.google.cloud.deploy.v1.IAutomationRun, - protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, - {}|null|undefined>): void; - getAutomationRun( - request?: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.IAutomationRun, - protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.IAutomationRun, - protos.google.cloud.deploy.v1.IGetAutomationRunRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.IAutomationRun, - protos.google.cloud.deploy.v1.IGetAutomationRunRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getAutomationRun(request, options, callback); - } -/** - * Cancels an AutomationRun. The `state` of the `AutomationRun` after - * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on - * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun - * in a different state returns an `FAILED_PRECONDITION` error. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the `AutomationRun`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.CancelAutomationRunResponse|CancelAutomationRunResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.cancel_automation_run.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async - */ - cancelAutomationRun( - request?: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, - protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|undefined, {}|undefined - ]>; - cancelAutomationRun( - request: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, - protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, - {}|null|undefined>): void; - cancelAutomationRun( - request: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, - callback: Callback< - protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, - protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, - {}|null|undefined>): void; - cancelAutomationRun( - request?: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, - protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, - protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, - protos.google.cloud.deploy.v1.ICancelAutomationRunRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.cancelAutomationRun(request, options, callback); - } - -/** - * Creates a new DeliveryPipeline in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}`. - * @param {string} request.deliveryPipelineId - * Required. ID of the `DeliveryPipeline`. - * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline - * Required. The `DeliveryPipeline` to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async - */ - createDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createDeliveryPipeline( - request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDeliveryPipeline( - request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createDeliveryPipeline(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createDeliveryPipeline()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async - */ - async checkCreateDeliveryPipelineProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the parameters of a single DeliveryPipeline. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeliveryPipeline` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline - * Required. The `DeliveryPipeline` to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, updating a `DeliveryPipeline` that does not exist - * will result in the creation of a new `DeliveryPipeline`. - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async - */ - updateDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'delivery_pipeline.name': request.deliveryPipeline!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDeliveryPipeline(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDeliveryPipeline()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async - */ - async checkUpdateDeliveryPipelineProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single DeliveryPipeline. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `DeliveryPipeline` to delete. Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, then deleting an already deleted or non-existing - * `DeliveryPipeline` will succeed. - * @param {boolean} [request.validateOnly] - * Optional. If set, validate the request and preview the review, but do not - * actually post it. - * @param {boolean} [request.force] - * Optional. If set to true, all child resources under this pipeline will also - * be deleted. Otherwise, the request will only work if the pipeline has no - * child resources. - * @param {string} [request.etag] - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async - */ - deleteDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteDeliveryPipeline(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteDeliveryPipeline()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async - */ - async checkDeleteDeliveryPipelineProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new Target in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Target` should be created. - * Format should be - * `projects/{project_id}/locations/{location_name}`. - * @param {string} request.targetId - * Required. ID of the `Target`. - * @param {google.cloud.deploy.v1.Target} request.target - * Required. The `Target` to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async - */ - createTarget( - request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createTarget( - request: protos.google.cloud.deploy.v1.ICreateTargetRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createTarget( - request: protos.google.cloud.deploy.v1.ICreateTargetRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createTarget( - request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createTarget(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createTarget()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async - */ - async checkCreateTargetProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createTarget, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the parameters of a single Target. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * Target resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.deploy.v1.Target} request.target - * Required. The `Target` to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, updating a `Target` that does not exist will - * result in the creation of a new `Target`. - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async - */ - updateTarget( - request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateTarget( - request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateTarget( - request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateTarget( - request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'target.name': request.target!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTarget(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateTarget()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async - */ - async checkUpdateTargetProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateTarget, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single Target. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `Target` to delete. Format should be - * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, then deleting an already deleted or non-existing - * `Target` will succeed. - * @param {boolean} [request.validateOnly] - * Optional. If set, validate the request and preview the review, but do not - * actually post it. - * @param {string} [request.etag] - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async - */ - deleteTarget( - request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteTarget( - request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteTarget( - request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteTarget( - request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteTarget(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteTarget()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async - */ - async checkDeleteTargetProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteTarget, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new Release in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Release` should be created. - * Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {string} request.releaseId - * Required. ID of the `Release`. - * @param {google.cloud.deploy.v1.Release} request.release - * Required. The `Release` to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_release.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async - */ - createRelease( - request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createRelease( - request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRelease( - request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRelease( - request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createRelease(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createRelease()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_release.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async - */ - async checkCreateReleaseProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRelease, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new Rollout in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Rollout` should be created. - * Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. - * @param {string} request.rolloutId - * Required. ID of the `Rollout`. - * @param {google.cloud.deploy.v1.Rollout} request.rollout - * Required. The `Rollout` to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {string} [request.startingPhaseId] - * Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` - * will start at the first phase. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async - */ - createRollout( - request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createRollout( - request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRollout( - request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createRollout( - request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createRollout(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createRollout()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async - */ - async checkCreateRolloutProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createRollout, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new Automation in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Automation` should be - * created. Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {string} request.automationId - * Required. ID of the `Automation`. - * @param {google.cloud.deploy.v1.Automation} request.automation - * Required. The `Automation` to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async - */ - createAutomation( - request?: protos.google.cloud.deploy.v1.ICreateAutomationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createAutomation( - request: protos.google.cloud.deploy.v1.ICreateAutomationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAutomation( - request: protos.google.cloud.deploy.v1.ICreateAutomationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createAutomation( - request?: protos.google.cloud.deploy.v1.ICreateAutomationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.createAutomation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createAutomation()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async - */ - async checkCreateAutomationProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createAutomation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the parameters of a single Automation resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Automation` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.deploy.v1.Automation} request.automation - * Required. The `Automation` to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, updating a `Automation` that does not exist will - * result in the creation of a new `Automation`. - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async - */ - updateAutomation( - request?: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateAutomation( - request: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAutomation( - request: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateAutomation( - request?: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'automation.name': request.automation!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateAutomation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateAutomation()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async - */ - async checkUpdateAutomationProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateAutomation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single Automation resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `Automation` to delete. Format should be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, then deleting an already deleted or non-existing - * `Automation` will succeed. - * @param {boolean} [request.validateOnly] - * Optional. If set, validate the request and verify whether the resource - * exists, but do not actually post it. - * @param {string} [request.etag] - * Optional. The weak etag of the request. - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async - */ - deleteAutomation( - request?: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteAutomation( - request: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAutomation( - request: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteAutomation( - request?: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, - optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>, - callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.deleteAutomation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteAutomation()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_automation.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async - */ - async checkDeleteAutomationProgress(name: string): Promise>{ - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteAutomation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists DeliveryPipelines in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of pipelines. Format must - * be `projects/{project_id}/locations/{location_name}`. - * @param {number} request.pageSize - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListDeliveryPipelines` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - * @param {string} request.orderBy - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. - * 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 `listDeliveryPipelinesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listDeliveryPipelines( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IDeliveryPipeline[], - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest|null, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - ]>; - listDeliveryPipelines( - request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline>): void; - listDeliveryPipelines( - request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline>): void; - listDeliveryPipelines( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse|null|undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline>): - Promise<[ - protos.google.cloud.deploy.v1.IDeliveryPipeline[], - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest|null, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listDeliveryPipelines(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of pipelines. Format must - * be `projects/{project_id}/locations/{location_name}`. - * @param {number} request.pageSize - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListDeliveryPipelines` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - * @param {string} request.orderBy - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline} 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 `listDeliveryPipelinesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listDeliveryPipelinesStream( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listDeliveryPipelines']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDeliveryPipelines.createStream( - this.innerApiCalls.listDeliveryPipelines as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDeliveryPipelines`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of pipelines. Format must - * be `projects/{project_id}/locations/{location_name}`. - * @param {number} request.pageSize - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListDeliveryPipelines` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - * @param {string} request.orderBy - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_delivery_pipelines.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async - */ - listDeliveryPipelinesAsync( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listDeliveryPipelines']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDeliveryPipelines.asyncIterate( - this.innerApiCalls['listDeliveryPipelines'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Targets in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of targets. Format must be - * `projects/{project_id}/locations/{location_name}`. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Target|Target}. - * 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 `listTargetsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTargets( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.ITarget[], - protos.google.cloud.deploy.v1.IListTargetsRequest|null, - protos.google.cloud.deploy.v1.IListTargetsResponse - ]>; - listTargets( - request: protos.google.cloud.deploy.v1.IListTargetsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, - protos.google.cloud.deploy.v1.ITarget>): void; - listTargets( - request: protos.google.cloud.deploy.v1.IListTargetsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, - protos.google.cloud.deploy.v1.ITarget>): void; - listTargets( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, - protos.google.cloud.deploy.v1.ITarget>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse|null|undefined, - protos.google.cloud.deploy.v1.ITarget>): - Promise<[ - protos.google.cloud.deploy.v1.ITarget[], - protos.google.cloud.deploy.v1.IListTargetsRequest|null, - protos.google.cloud.deploy.v1.IListTargetsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listTargets(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of targets. Format must be - * `projects/{project_id}/locations/{location_name}`. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Target|Target} 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 `listTargetsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listTargetsStream( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTargets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTargets.createStream( - this.innerApiCalls.listTargets as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listTargets`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of targets. Format must be - * `projects/{project_id}/locations/{location_name}`. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Target|Target}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_targets.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListTargets_async - */ - listTargetsAsync( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listTargets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTargets.asyncIterate( - this.innerApiCalls['listTargets'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Releases in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The `DeliveryPipeline` which owns this collection of `Release` - * objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReleases` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Release|Release}. - * 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 `listReleasesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listReleases( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IRelease[], - protos.google.cloud.deploy.v1.IListReleasesRequest|null, - protos.google.cloud.deploy.v1.IListReleasesResponse - ]>; - listReleases( - request: protos.google.cloud.deploy.v1.IListReleasesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, - protos.google.cloud.deploy.v1.IRelease>): void; - listReleases( - request: protos.google.cloud.deploy.v1.IListReleasesRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, - protos.google.cloud.deploy.v1.IRelease>): void; - listReleases( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, - protos.google.cloud.deploy.v1.IRelease>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse|null|undefined, - protos.google.cloud.deploy.v1.IRelease>): - Promise<[ - protos.google.cloud.deploy.v1.IRelease[], - protos.google.cloud.deploy.v1.IListReleasesRequest|null, - protos.google.cloud.deploy.v1.IListReleasesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listReleases(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 `DeliveryPipeline` which owns this collection of `Release` - * objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReleases` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Release|Release} 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 `listReleasesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listReleasesStream( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listReleases']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listReleases.createStream( - this.innerApiCalls.listReleases as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listReleases`, 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 `DeliveryPipeline` which owns this collection of `Release` - * objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReleases` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Release|Release}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_releases.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListReleases_async - */ - listReleasesAsync( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listReleases']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listReleases.asyncIterate( - this.innerApiCalls['listReleases'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Rollouts in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The `Release` which owns this collection of `Rollout` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRollouts` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. - * 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 `listRolloutsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRollouts( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IRollout[], - protos.google.cloud.deploy.v1.IListRolloutsRequest|null, - protos.google.cloud.deploy.v1.IListRolloutsResponse - ]>; - listRollouts( - request: protos.google.cloud.deploy.v1.IListRolloutsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, - protos.google.cloud.deploy.v1.IRollout>): void; - listRollouts( - request: protos.google.cloud.deploy.v1.IListRolloutsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, - protos.google.cloud.deploy.v1.IRollout>): void; - listRollouts( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, - protos.google.cloud.deploy.v1.IRollout>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse|null|undefined, - protos.google.cloud.deploy.v1.IRollout>): - Promise<[ - protos.google.cloud.deploy.v1.IRollout[], - protos.google.cloud.deploy.v1.IListRolloutsRequest|null, - protos.google.cloud.deploy.v1.IListRolloutsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listRollouts(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 `Release` which owns this collection of `Rollout` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRollouts` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Rollout|Rollout} 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 `listRolloutsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listRolloutsStream( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRollouts']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listRollouts.createStream( - this.innerApiCalls.listRollouts as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listRollouts`, 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 `Release` which owns this collection of `Rollout` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRollouts` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_rollouts.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListRollouts_async - */ - listRolloutsAsync( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listRollouts']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listRollouts.asyncIterate( - this.innerApiCalls['listRollouts'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists JobRuns in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The `Rollout` which owns this collection of `JobRun` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListJobRuns` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. - * 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 `listJobRunsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listJobRuns( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IJobRun[], - protos.google.cloud.deploy.v1.IListJobRunsRequest|null, - protos.google.cloud.deploy.v1.IListJobRunsResponse - ]>; - listJobRuns( - request: protos.google.cloud.deploy.v1.IListJobRunsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IJobRun>): void; - listJobRuns( - request: protos.google.cloud.deploy.v1.IListJobRunsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IJobRun>): void; - listJobRuns( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IJobRun>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IJobRun>): - Promise<[ - protos.google.cloud.deploy.v1.IJobRun[], - protos.google.cloud.deploy.v1.IListJobRunsRequest|null, - protos.google.cloud.deploy.v1.IListJobRunsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listJobRuns(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 `Rollout` which owns this collection of `JobRun` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListJobRuns` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.JobRun|JobRun} 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 `listJobRunsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listJobRunsStream( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listJobRuns']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobRuns.createStream( - this.innerApiCalls.listJobRuns as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listJobRuns`, 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 `Rollout` which owns this collection of `JobRun` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListJobRuns` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_job_runs.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async - */ - listJobRunsAsync( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listJobRuns']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listJobRuns.asyncIterate( - this.innerApiCalls['listJobRuns'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Automations in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of automations. Format - * must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {number} request.pageSize - * The maximum number of automations to return. The service may return - * fewer than this value. If unspecified, at most 50 automations will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListAutomations` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter automations to be returned. All fields can be used in the - * filter. - * @param {string} request.orderBy - * Field to sort by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Automation|Automation}. - * 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 `listAutomationsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAutomations( - request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IAutomation[], - protos.google.cloud.deploy.v1.IListAutomationsRequest|null, - protos.google.cloud.deploy.v1.IListAutomationsResponse - ]>; - listAutomations( - request: protos.google.cloud.deploy.v1.IListAutomationsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationsRequest, - protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomation>): void; - listAutomations( - request: protos.google.cloud.deploy.v1.IListAutomationsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationsRequest, - protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomation>): void; - listAutomations( - request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationsRequest, - protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomation>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationsRequest, - protos.google.cloud.deploy.v1.IListAutomationsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomation>): - Promise<[ - protos.google.cloud.deploy.v1.IAutomation[], - protos.google.cloud.deploy.v1.IListAutomationsRequest|null, - protos.google.cloud.deploy.v1.IListAutomationsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listAutomations(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of automations. Format - * must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {number} request.pageSize - * The maximum number of automations to return. The service may return - * fewer than this value. If unspecified, at most 50 automations will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListAutomations` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter automations to be returned. All fields can be used in the - * filter. - * @param {string} request.orderBy - * Field to sort by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Automation|Automation} 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 `listAutomationsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAutomationsStream( - request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAutomations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAutomations.createStream( - this.innerApiCalls.listAutomations as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAutomations`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of automations. Format - * must be - * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. - * @param {number} request.pageSize - * The maximum number of automations to return. The service may return - * fewer than this value. If unspecified, at most 50 automations will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListAutomations` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter automations to be returned. All fields can be used in the - * filter. - * @param {string} request.orderBy - * Field to sort by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Automation|Automation}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_automations.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListAutomations_async - */ - listAutomationsAsync( - request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAutomations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAutomations.asyncIterate( - this.innerApiCalls['listAutomations'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists AutomationRuns in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of automationRuns. Format - * must be - * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. - * @param {number} request.pageSize - * The maximum number of automationRuns to return. The service may return - * fewer than this value. If unspecified, at most 50 automationRuns will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListAutomationRuns` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter automationRuns to be returned. All fields can be used in the - * filter. - * @param {string} request.orderBy - * Field to sort by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. - * 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 `listAutomationRunsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAutomationRuns( - request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.deploy.v1.IAutomationRun[], - protos.google.cloud.deploy.v1.IListAutomationRunsRequest|null, - protos.google.cloud.deploy.v1.IListAutomationRunsResponse - ]>; - listAutomationRuns( - request: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomationRun>): void; - listAutomationRuns( - request: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomationRun>): void; - listAutomationRuns( - request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomationRun>, - callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - protos.google.cloud.deploy.v1.IListAutomationRunsResponse|null|undefined, - protos.google.cloud.deploy.v1.IAutomationRun>): - Promise<[ - protos.google.cloud.deploy.v1.IAutomationRun[], - protos.google.cloud.deploy.v1.IListAutomationRunsRequest|null, - protos.google.cloud.deploy.v1.IListAutomationRunsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - this.initialize(); - return this.innerApiCalls.listAutomationRuns(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of automationRuns. Format - * must be - * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. - * @param {number} request.pageSize - * The maximum number of automationRuns to return. The service may return - * fewer than this value. If unspecified, at most 50 automationRuns will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListAutomationRuns` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter automationRuns to be returned. All fields can be used in the - * filter. - * @param {string} request.orderBy - * Field to sort by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun} 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 `listAutomationRunsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listAutomationRunsStream( - request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - options?: CallOptions): - Transform{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAutomationRuns']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAutomationRuns.createStream( - this.innerApiCalls.listAutomationRuns as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listAutomationRuns`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of automationRuns. Format - * must be - * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. - * @param {number} request.pageSize - * The maximum number of automationRuns to return. The service may return - * fewer than this value. If unspecified, at most 50 automationRuns will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListAutomationRuns` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter automationRuns to be returned. All fields can be used in the - * filter. - * @param {string} request.orderBy - * Field to sort by. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_automation_runs.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async - */ - listAutomationRunsAsync( - request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, - options?: CallOptions): - AsyncIterable{ - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listAutomationRuns']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listAutomationRuns.asyncIterate( - this.innerApiCalls['listAutomationRuns'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * Gets the access control policy for a resource. Returns an empty policy - * if the resource exists and does not have a policy set. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - getIamPolicy( - request: IamProtos.google.iam.v1.GetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.getIamPolicy(request, options, callback); - } - -/** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - setIamPolicy( - request: IamProtos.google.iam.v1.SetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.setIamPolicy(request, options, callback); - } - -/** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - */ - testIamPermissions( - request: IamProtos.google.iam.v1.TestIamPermissionsRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.TestIamPermissionsResponse, - IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { - return this.iamClient.testIamPermissions(request, options, callback); - } - -/** - * Gets information about a location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Resource name for the location. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example - * ``` - * const [response] = await client.getLocation(request); - * ``` - */ - getLocation( - request: LocationProtos.google.cloud.location.IGetLocationRequest, - options?: - | gax.CallOptions - | Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - LocationProtos.google.cloud.location.ILocation, - | LocationProtos.google.cloud.location.IGetLocationRequest - | null - | undefined, - {} | null | undefined - > - ): Promise { - return this.locationsClient.getLocation(request, options, callback); - } - -/** - * Lists information about the supported locations for this service. Returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource that owns the locations collection, if applicable. - * @param {string} request.filter - * The standard list filter. - * @param {number} request.pageSize - * The standard list page size. - * @param {string} request.pageToken - * The standard list page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example - * ``` - * const iterable = client.listLocationsAsync(request); - * for await (const response of iterable) { - * // process response - * } - * ``` - */ - listLocationsAsync( - request: LocationProtos.google.cloud.location.IListLocationsRequest, - options?: CallOptions - ): AsyncIterable { - return this.locationsClient.listLocationsAsync(request, options); - } - -/** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error, ?Object)=} callback - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * @return {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * {@link google.longrunning.Operation | google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * const name = ''; - * const [response] = await client.getOperation({name}); - * // doThingsWith(response) - * ``` - */ - getOperation( - request: protos.google.longrunning.GetOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.longrunning.Operation, - protos.google.longrunning.GetOperationRequest, - {} | null | undefined - > - ): Promise<[protos.google.longrunning.Operation]> { - return this.operationsClient.getOperation(request, options, callback); - } - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. - * - * For-await-of syntax is used with the iterable to recursively get response element on-demand. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation collection. - * @param {string} request.filter - The standard list filter. - * @param {number=} request.pageSize - - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @returns {Object} - * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * for await (const response of client.listOperationsAsync(request)); - * // doThingsWith(response) - * ``` - */ - listOperationsAsync( - request: protos.google.longrunning.ListOperationsRequest, - options?: gax.CallOptions - ): AsyncIterable { - return this.operationsClient.listOperationsAsync(request, options); - } - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * {@link Operations.GetOperation} or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an {@link Operation.error} value with a {@link google.rpc.Status.code} of - * 1, corresponding to `Code.CANCELLED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be cancelled. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the - * details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.cancelOperation({name: ''}); - * ``` - */ - cancelOperation( - request: protos.google.longrunning.CancelOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - return this.operationsClient.cancelOperation(request, options, callback); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * @param {Object} request - The request object that will be sent. - * @param {string} request.name - The name of the operation resource to be deleted. - * @param {Object=} options - * Optional parameters. You can override the default settings for this call, - * e.g, timeout, retries, paginations, etc. See {@link - * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} - * for the details. - * @param {function(?Error)=} callback - * The function which will be called with the result of the API call. - * @return {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API - * call. - * - * @example - * ``` - * const client = longrunning.operationsClient(); - * await client.deleteOperation({name: ''}); - * ``` - */ - deleteOperation( - request: protos.google.longrunning.DeleteOperationRequest, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.DeleteOperationRequest, - {} | null | undefined - > - ): Promise { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified automation resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} delivery_pipeline - * @param {string} automation - * @returns {string} Resource name string. - */ - automationPath(project:string,location:string,deliveryPipeline:string,automation:string) { - return this.pathTemplates.automationPathTemplate.render({ - project: project, - location: location, - delivery_pipeline: deliveryPipeline, - automation: automation, - }); - } - - /** - * Parse the project from Automation resource. - * - * @param {string} automationName - * A fully-qualified path representing Automation resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAutomationName(automationName: string) { - return this.pathTemplates.automationPathTemplate.match(automationName).project; - } - - /** - * Parse the location from Automation resource. - * - * @param {string} automationName - * A fully-qualified path representing Automation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAutomationName(automationName: string) { - return this.pathTemplates.automationPathTemplate.match(automationName).location; - } - - /** - * Parse the delivery_pipeline from Automation resource. - * - * @param {string} automationName - * A fully-qualified path representing Automation resource. - * @returns {string} A string representing the delivery_pipeline. - */ - matchDeliveryPipelineFromAutomationName(automationName: string) { - return this.pathTemplates.automationPathTemplate.match(automationName).delivery_pipeline; - } - - /** - * Parse the automation from Automation resource. - * - * @param {string} automationName - * A fully-qualified path representing Automation resource. - * @returns {string} A string representing the automation. - */ - matchAutomationFromAutomationName(automationName: string) { - return this.pathTemplates.automationPathTemplate.match(automationName).automation; - } - - /** - * Return a fully-qualified automationRun resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} delivery_pipeline - * @param {string} automation_run - * @returns {string} Resource name string. - */ - automationRunPath(project:string,location:string,deliveryPipeline:string,automationRun:string) { - return this.pathTemplates.automationRunPathTemplate.render({ - project: project, - location: location, - delivery_pipeline: deliveryPipeline, - automation_run: automationRun, - }); - } - - /** - * Parse the project from AutomationRun resource. - * - * @param {string} automationRunName - * A fully-qualified path representing AutomationRun resource. - * @returns {string} A string representing the project. - */ - matchProjectFromAutomationRunName(automationRunName: string) { - return this.pathTemplates.automationRunPathTemplate.match(automationRunName).project; - } - - /** - * Parse the location from AutomationRun resource. - * - * @param {string} automationRunName - * A fully-qualified path representing AutomationRun resource. - * @returns {string} A string representing the location. - */ - matchLocationFromAutomationRunName(automationRunName: string) { - return this.pathTemplates.automationRunPathTemplate.match(automationRunName).location; - } - - /** - * Parse the delivery_pipeline from AutomationRun resource. - * - * @param {string} automationRunName - * A fully-qualified path representing AutomationRun resource. - * @returns {string} A string representing the delivery_pipeline. - */ - matchDeliveryPipelineFromAutomationRunName(automationRunName: string) { - return this.pathTemplates.automationRunPathTemplate.match(automationRunName).delivery_pipeline; - } - - /** - * Parse the automation_run from AutomationRun resource. - * - * @param {string} automationRunName - * A fully-qualified path representing AutomationRun resource. - * @returns {string} A string representing the automation_run. - */ - matchAutomationRunFromAutomationRunName(automationRunName: string) { - return this.pathTemplates.automationRunPathTemplate.match(automationRunName).automation_run; - } - - /** - * Return a fully-qualified build resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} build - * @returns {string} Resource name string. - */ - buildPath(project:string,location:string,build:string) { - return this.pathTemplates.buildPathTemplate.render({ - project: project, - location: location, - build: build, - }); - } - - /** - * Parse the project from Build resource. - * - * @param {string} buildName - * A fully-qualified path representing Build resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBuildName(buildName: string) { - return this.pathTemplates.buildPathTemplate.match(buildName).project; - } - - /** - * Parse the location from Build resource. - * - * @param {string} buildName - * A fully-qualified path representing Build resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBuildName(buildName: string) { - return this.pathTemplates.buildPathTemplate.match(buildName).location; - } - - /** - * Parse the build from Build resource. - * - * @param {string} buildName - * A fully-qualified path representing Build resource. - * @returns {string} A string representing the build. - */ - matchBuildFromBuildName(buildName: string) { - return this.pathTemplates.buildPathTemplate.match(buildName).build; - } - - /** - * Return a fully-qualified cluster resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} cluster - * @returns {string} Resource name string. - */ - clusterPath(project:string,location:string,cluster:string) { - return this.pathTemplates.clusterPathTemplate.render({ - project: project, - location: location, - cluster: cluster, - }); - } - - /** - * Parse the project from Cluster resource. - * - * @param {string} clusterName - * A fully-qualified path representing Cluster resource. - * @returns {string} A string representing the project. - */ - matchProjectFromClusterName(clusterName: string) { - return this.pathTemplates.clusterPathTemplate.match(clusterName).project; - } - - /** - * Parse the location from Cluster resource. - * - * @param {string} clusterName - * A fully-qualified path representing Cluster resource. - * @returns {string} A string representing the location. - */ - matchLocationFromClusterName(clusterName: string) { - return this.pathTemplates.clusterPathTemplate.match(clusterName).location; - } - - /** - * Parse the cluster from Cluster resource. - * - * @param {string} clusterName - * A fully-qualified path representing Cluster resource. - * @returns {string} A string representing the cluster. - */ - matchClusterFromClusterName(clusterName: string) { - return this.pathTemplates.clusterPathTemplate.match(clusterName).cluster; - } - - /** - * Return a fully-qualified config resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - configPath(project:string,location:string) { - return this.pathTemplates.configPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Config resource. - * - * @param {string} configName - * A fully-qualified path representing Config resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConfigName(configName: string) { - return this.pathTemplates.configPathTemplate.match(configName).project; - } - - /** - * Parse the location from Config resource. - * - * @param {string} configName - * A fully-qualified path representing Config resource. - * @returns {string} A string representing the location. - */ - matchLocationFromConfigName(configName: string) { - return this.pathTemplates.configPathTemplate.match(configName).location; - } - - /** - * Return a fully-qualified deliveryPipeline resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} delivery_pipeline - * @returns {string} Resource name string. - */ - deliveryPipelinePath(project:string,location:string,deliveryPipeline:string) { - return this.pathTemplates.deliveryPipelinePathTemplate.render({ - project: project, - location: location, - delivery_pipeline: deliveryPipeline, - }); - } - - /** - * Parse the project from DeliveryPipeline resource. - * - * @param {string} deliveryPipelineName - * A fully-qualified path representing DeliveryPipeline resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDeliveryPipelineName(deliveryPipelineName: string) { - return this.pathTemplates.deliveryPipelinePathTemplate.match(deliveryPipelineName).project; - } - - /** - * Parse the location from DeliveryPipeline resource. - * - * @param {string} deliveryPipelineName - * A fully-qualified path representing DeliveryPipeline resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDeliveryPipelineName(deliveryPipelineName: string) { - return this.pathTemplates.deliveryPipelinePathTemplate.match(deliveryPipelineName).location; - } - - /** - * Parse the delivery_pipeline from DeliveryPipeline resource. - * - * @param {string} deliveryPipelineName - * A fully-qualified path representing DeliveryPipeline resource. - * @returns {string} A string representing the delivery_pipeline. - */ - matchDeliveryPipelineFromDeliveryPipelineName(deliveryPipelineName: string) { - return this.pathTemplates.deliveryPipelinePathTemplate.match(deliveryPipelineName).delivery_pipeline; - } - - /** - * Return a fully-qualified job resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} job - * @returns {string} Resource name string. - */ - jobPath(project:string,location:string,job:string) { - return this.pathTemplates.jobPathTemplate.render({ - project: project, - location: location, - job: job, - }); - } - - /** - * Parse the project from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).project; - } - - /** - * Parse the location from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).location; - } - - /** - * Parse the job from Job resource. - * - * @param {string} jobName - * A fully-qualified path representing Job resource. - * @returns {string} A string representing the job. - */ - matchJobFromJobName(jobName: string) { - return this.pathTemplates.jobPathTemplate.match(jobName).job; - } - - /** - * Return a fully-qualified jobRun resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} delivery_pipeline - * @param {string} release - * @param {string} rollout - * @param {string} job_run - * @returns {string} Resource name string. - */ - jobRunPath(project:string,location:string,deliveryPipeline:string,release:string,rollout:string,jobRun:string) { - return this.pathTemplates.jobRunPathTemplate.render({ - project: project, - location: location, - delivery_pipeline: deliveryPipeline, - release: release, - rollout: rollout, - job_run: jobRun, - }); - } - - /** - * Parse the project from JobRun resource. - * - * @param {string} jobRunName - * A fully-qualified path representing JobRun resource. - * @returns {string} A string representing the project. - */ - matchProjectFromJobRunName(jobRunName: string) { - return this.pathTemplates.jobRunPathTemplate.match(jobRunName).project; - } - - /** - * Parse the location from JobRun resource. - * - * @param {string} jobRunName - * A fully-qualified path representing JobRun resource. - * @returns {string} A string representing the location. - */ - matchLocationFromJobRunName(jobRunName: string) { - return this.pathTemplates.jobRunPathTemplate.match(jobRunName).location; - } - - /** - * Parse the delivery_pipeline from JobRun resource. - * - * @param {string} jobRunName - * A fully-qualified path representing JobRun resource. - * @returns {string} A string representing the delivery_pipeline. - */ - matchDeliveryPipelineFromJobRunName(jobRunName: string) { - return this.pathTemplates.jobRunPathTemplate.match(jobRunName).delivery_pipeline; - } - - /** - * Parse the release from JobRun resource. - * - * @param {string} jobRunName - * A fully-qualified path representing JobRun resource. - * @returns {string} A string representing the release. - */ - matchReleaseFromJobRunName(jobRunName: string) { - return this.pathTemplates.jobRunPathTemplate.match(jobRunName).release; - } - - /** - * Parse the rollout from JobRun resource. - * - * @param {string} jobRunName - * A fully-qualified path representing JobRun resource. - * @returns {string} A string representing the rollout. - */ - matchRolloutFromJobRunName(jobRunName: string) { - return this.pathTemplates.jobRunPathTemplate.match(jobRunName).rollout; - } - - /** - * Parse the job_run from JobRun resource. - * - * @param {string} jobRunName - * A fully-qualified path representing JobRun resource. - * @returns {string} A string representing the job_run. - */ - matchJobRunFromJobRunName(jobRunName: string) { - return this.pathTemplates.jobRunPathTemplate.match(jobRunName).job_run; - } - - /** - * 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 membership resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} membership - * @returns {string} Resource name string. - */ - membershipPath(project:string,location:string,membership:string) { - return this.pathTemplates.membershipPathTemplate.render({ - project: project, - location: location, - membership: membership, - }); - } - - /** - * Parse the project from Membership resource. - * - * @param {string} membershipName - * A fully-qualified path representing Membership resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMembershipName(membershipName: string) { - return this.pathTemplates.membershipPathTemplate.match(membershipName).project; - } - - /** - * Parse the location from Membership resource. - * - * @param {string} membershipName - * A fully-qualified path representing Membership resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMembershipName(membershipName: string) { - return this.pathTemplates.membershipPathTemplate.match(membershipName).location; - } - - /** - * Parse the membership from Membership resource. - * - * @param {string} membershipName - * A fully-qualified path representing Membership resource. - * @returns {string} A string representing the membership. - */ - matchMembershipFromMembershipName(membershipName: string) { - return this.pathTemplates.membershipPathTemplate.match(membershipName).membership; - } - - /** - * 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 release resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} delivery_pipeline - * @param {string} release - * @returns {string} Resource name string. - */ - releasePath(project:string,location:string,deliveryPipeline:string,release:string) { - return this.pathTemplates.releasePathTemplate.render({ - project: project, - location: location, - delivery_pipeline: deliveryPipeline, - release: release, - }); - } - - /** - * Parse the project from Release resource. - * - * @param {string} releaseName - * A fully-qualified path representing Release resource. - * @returns {string} A string representing the project. - */ - matchProjectFromReleaseName(releaseName: string) { - return this.pathTemplates.releasePathTemplate.match(releaseName).project; - } - - /** - * Parse the location from Release resource. - * - * @param {string} releaseName - * A fully-qualified path representing Release resource. - * @returns {string} A string representing the location. - */ - matchLocationFromReleaseName(releaseName: string) { - return this.pathTemplates.releasePathTemplate.match(releaseName).location; - } - - /** - * Parse the delivery_pipeline from Release resource. - * - * @param {string} releaseName - * A fully-qualified path representing Release resource. - * @returns {string} A string representing the delivery_pipeline. - */ - matchDeliveryPipelineFromReleaseName(releaseName: string) { - return this.pathTemplates.releasePathTemplate.match(releaseName).delivery_pipeline; - } - - /** - * Parse the release from Release resource. - * - * @param {string} releaseName - * A fully-qualified path representing Release resource. - * @returns {string} A string representing the release. - */ - matchReleaseFromReleaseName(releaseName: string) { - return this.pathTemplates.releasePathTemplate.match(releaseName).release; - } - - /** - * Return a fully-qualified rollout resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} delivery_pipeline - * @param {string} release - * @param {string} rollout - * @returns {string} Resource name string. - */ - rolloutPath(project:string,location:string,deliveryPipeline:string,release:string,rollout:string) { - return this.pathTemplates.rolloutPathTemplate.render({ - project: project, - location: location, - delivery_pipeline: deliveryPipeline, - release: release, - rollout: rollout, - }); - } - - /** - * Parse the project from Rollout resource. - * - * @param {string} rolloutName - * A fully-qualified path representing Rollout resource. - * @returns {string} A string representing the project. - */ - matchProjectFromRolloutName(rolloutName: string) { - return this.pathTemplates.rolloutPathTemplate.match(rolloutName).project; - } - - /** - * Parse the location from Rollout resource. - * - * @param {string} rolloutName - * A fully-qualified path representing Rollout resource. - * @returns {string} A string representing the location. - */ - matchLocationFromRolloutName(rolloutName: string) { - return this.pathTemplates.rolloutPathTemplate.match(rolloutName).location; - } - - /** - * Parse the delivery_pipeline from Rollout resource. - * - * @param {string} rolloutName - * A fully-qualified path representing Rollout resource. - * @returns {string} A string representing the delivery_pipeline. - */ - matchDeliveryPipelineFromRolloutName(rolloutName: string) { - return this.pathTemplates.rolloutPathTemplate.match(rolloutName).delivery_pipeline; - } - - /** - * Parse the release from Rollout resource. - * - * @param {string} rolloutName - * A fully-qualified path representing Rollout resource. - * @returns {string} A string representing the release. - */ - matchReleaseFromRolloutName(rolloutName: string) { - return this.pathTemplates.rolloutPathTemplate.match(rolloutName).release; - } - - /** - * Parse the rollout from Rollout resource. - * - * @param {string} rolloutName - * A fully-qualified path representing Rollout resource. - * @returns {string} A string representing the rollout. - */ - matchRolloutFromRolloutName(rolloutName: string) { - return this.pathTemplates.rolloutPathTemplate.match(rolloutName).rollout; - } - - /** - * Return a fully-qualified service resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} service - * @returns {string} Resource name string. - */ - servicePath(project:string,location:string,service:string) { - return this.pathTemplates.servicePathTemplate.render({ - project: project, - location: location, - service: service, - }); - } - - /** - * Parse the project from Service resource. - * - * @param {string} serviceName - * A fully-qualified path representing Service resource. - * @returns {string} A string representing the project. - */ - matchProjectFromServiceName(serviceName: string) { - return this.pathTemplates.servicePathTemplate.match(serviceName).project; - } - - /** - * Parse the location from Service resource. - * - * @param {string} serviceName - * A fully-qualified path representing Service resource. - * @returns {string} A string representing the location. - */ - matchLocationFromServiceName(serviceName: string) { - return this.pathTemplates.servicePathTemplate.match(serviceName).location; - } - - /** - * Parse the service from Service resource. - * - * @param {string} serviceName - * A fully-qualified path representing Service resource. - * @returns {string} A string representing the service. - */ - matchServiceFromServiceName(serviceName: string) { - return this.pathTemplates.servicePathTemplate.match(serviceName).service; - } - - /** - * Return a fully-qualified target resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} target - * @returns {string} Resource name string. - */ - targetPath(project:string,location:string,target:string) { - return this.pathTemplates.targetPathTemplate.render({ - project: project, - location: location, - target: target, - }); - } - - /** - * Parse the project from Target resource. - * - * @param {string} targetName - * A fully-qualified path representing Target resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTargetName(targetName: string) { - return this.pathTemplates.targetPathTemplate.match(targetName).project; - } - - /** - * Parse the location from Target resource. - * - * @param {string} targetName - * A fully-qualified path representing Target resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTargetName(targetName: string) { - return this.pathTemplates.targetPathTemplate.match(targetName).location; - } - - /** - * Parse the target from Target resource. - * - * @param {string} targetName - * A fully-qualified path representing Target resource. - * @returns {string} A string representing the target. - */ - matchTargetFromTargetName(targetName: string) { - return this.pathTemplates.targetPathTemplate.match(targetName).target; - } - - /** - * 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. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.cloudDeployStub && !this._terminated) { - return this.cloudDeployStub.then(stub => { - this._terminated = true; - stub.close(); - this.iamClient.close(); - this.locationsClient.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json deleted file mode 100644 index 517f87e4a48..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_client_config.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "interfaces": { - "google.cloud.deploy.v1.CloudDeploy": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListDeliveryPipelines": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetDeliveryPipeline": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateDeliveryPipeline": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateDeliveryPipeline": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteDeliveryPipeline": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListTargets": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "RollbackTarget": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetTarget": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateTarget": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTarget": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTarget": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListReleases": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetRelease": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateRelease": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AbandonRelease": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ApproveRollout": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AdvanceRollout": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CancelRollout": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListRollouts": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetRollout": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateRollout": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "IgnoreJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RetryJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListJobRuns": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetJobRun": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "TerminateJobRun": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CreateAutomation": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAutomation": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAutomation": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAutomation": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "ListAutomations": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "GetAutomationRun": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "ListAutomationRuns": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" - }, - "CancelAutomationRun": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json b/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json deleted file mode 100644 index bbe672c08a4..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/src/v1/cloud_deploy_proto_list.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - "../../protos/google/cloud/deploy/v1/automation_payload.proto", - "../../protos/google/cloud/deploy/v1/automationrun_payload.proto", - "../../protos/google/cloud/deploy/v1/cloud_deploy.proto", - "../../protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto", - "../../protos/google/cloud/deploy/v1/jobrun_notification_payload.proto", - "../../protos/google/cloud/deploy/v1/log_enums.proto", - "../../protos/google/cloud/deploy/v1/release_notification_payload.proto", - "../../protos/google/cloud/deploy/v1/release_render_payload.proto", - "../../protos/google/cloud/deploy/v1/rollout_notification_payload.proto", - "../../protos/google/cloud/deploy/v1/rollout_update_payload.proto", - "../../protos/google/cloud/deploy/v1/target_notification_payload.proto" -] diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json deleted file mode 100644 index ea8136ea8b3..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,401 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.deploy.v1", - "libraryPackage": "@google-cloud/deploy", - "services": { - "CloudDeploy": { - "clients": { - "grpc": { - "libraryClient": "CloudDeployClient", - "rpcs": { - "GetDeliveryPipeline": { - "methods": [ - "getDeliveryPipeline" - ] - }, - "RollbackTarget": { - "methods": [ - "rollbackTarget" - ] - }, - "GetTarget": { - "methods": [ - "getTarget" - ] - }, - "GetRelease": { - "methods": [ - "getRelease" - ] - }, - "AbandonRelease": { - "methods": [ - "abandonRelease" - ] - }, - "ApproveRollout": { - "methods": [ - "approveRollout" - ] - }, - "AdvanceRollout": { - "methods": [ - "advanceRollout" - ] - }, - "CancelRollout": { - "methods": [ - "cancelRollout" - ] - }, - "GetRollout": { - "methods": [ - "getRollout" - ] - }, - "IgnoreJob": { - "methods": [ - "ignoreJob" - ] - }, - "RetryJob": { - "methods": [ - "retryJob" - ] - }, - "GetJobRun": { - "methods": [ - "getJobRun" - ] - }, - "TerminateJobRun": { - "methods": [ - "terminateJobRun" - ] - }, - "GetConfig": { - "methods": [ - "getConfig" - ] - }, - "GetAutomation": { - "methods": [ - "getAutomation" - ] - }, - "GetAutomationRun": { - "methods": [ - "getAutomationRun" - ] - }, - "CancelAutomationRun": { - "methods": [ - "cancelAutomationRun" - ] - }, - "CreateDeliveryPipeline": { - "methods": [ - "createDeliveryPipeline" - ] - }, - "UpdateDeliveryPipeline": { - "methods": [ - "updateDeliveryPipeline" - ] - }, - "DeleteDeliveryPipeline": { - "methods": [ - "deleteDeliveryPipeline" - ] - }, - "CreateTarget": { - "methods": [ - "createTarget" - ] - }, - "UpdateTarget": { - "methods": [ - "updateTarget" - ] - }, - "DeleteTarget": { - "methods": [ - "deleteTarget" - ] - }, - "CreateRelease": { - "methods": [ - "createRelease" - ] - }, - "CreateRollout": { - "methods": [ - "createRollout" - ] - }, - "CreateAutomation": { - "methods": [ - "createAutomation" - ] - }, - "UpdateAutomation": { - "methods": [ - "updateAutomation" - ] - }, - "DeleteAutomation": { - "methods": [ - "deleteAutomation" - ] - }, - "ListDeliveryPipelines": { - "methods": [ - "listDeliveryPipelines", - "listDeliveryPipelinesStream", - "listDeliveryPipelinesAsync" - ] - }, - "ListTargets": { - "methods": [ - "listTargets", - "listTargetsStream", - "listTargetsAsync" - ] - }, - "ListReleases": { - "methods": [ - "listReleases", - "listReleasesStream", - "listReleasesAsync" - ] - }, - "ListRollouts": { - "methods": [ - "listRollouts", - "listRolloutsStream", - "listRolloutsAsync" - ] - }, - "ListJobRuns": { - "methods": [ - "listJobRuns", - "listJobRunsStream", - "listJobRunsAsync" - ] - }, - "ListAutomations": { - "methods": [ - "listAutomations", - "listAutomationsStream", - "listAutomationsAsync" - ] - }, - "ListAutomationRuns": { - "methods": [ - "listAutomationRuns", - "listAutomationRunsStream", - "listAutomationRunsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "CloudDeployClient", - "rpcs": { - "GetDeliveryPipeline": { - "methods": [ - "getDeliveryPipeline" - ] - }, - "RollbackTarget": { - "methods": [ - "rollbackTarget" - ] - }, - "GetTarget": { - "methods": [ - "getTarget" - ] - }, - "GetRelease": { - "methods": [ - "getRelease" - ] - }, - "AbandonRelease": { - "methods": [ - "abandonRelease" - ] - }, - "ApproveRollout": { - "methods": [ - "approveRollout" - ] - }, - "AdvanceRollout": { - "methods": [ - "advanceRollout" - ] - }, - "CancelRollout": { - "methods": [ - "cancelRollout" - ] - }, - "GetRollout": { - "methods": [ - "getRollout" - ] - }, - "IgnoreJob": { - "methods": [ - "ignoreJob" - ] - }, - "RetryJob": { - "methods": [ - "retryJob" - ] - }, - "GetJobRun": { - "methods": [ - "getJobRun" - ] - }, - "TerminateJobRun": { - "methods": [ - "terminateJobRun" - ] - }, - "GetConfig": { - "methods": [ - "getConfig" - ] - }, - "GetAutomation": { - "methods": [ - "getAutomation" - ] - }, - "GetAutomationRun": { - "methods": [ - "getAutomationRun" - ] - }, - "CancelAutomationRun": { - "methods": [ - "cancelAutomationRun" - ] - }, - "CreateDeliveryPipeline": { - "methods": [ - "createDeliveryPipeline" - ] - }, - "UpdateDeliveryPipeline": { - "methods": [ - "updateDeliveryPipeline" - ] - }, - "DeleteDeliveryPipeline": { - "methods": [ - "deleteDeliveryPipeline" - ] - }, - "CreateTarget": { - "methods": [ - "createTarget" - ] - }, - "UpdateTarget": { - "methods": [ - "updateTarget" - ] - }, - "DeleteTarget": { - "methods": [ - "deleteTarget" - ] - }, - "CreateRelease": { - "methods": [ - "createRelease" - ] - }, - "CreateRollout": { - "methods": [ - "createRollout" - ] - }, - "CreateAutomation": { - "methods": [ - "createAutomation" - ] - }, - "UpdateAutomation": { - "methods": [ - "updateAutomation" - ] - }, - "DeleteAutomation": { - "methods": [ - "deleteAutomation" - ] - }, - "ListDeliveryPipelines": { - "methods": [ - "listDeliveryPipelines", - "listDeliveryPipelinesStream", - "listDeliveryPipelinesAsync" - ] - }, - "ListTargets": { - "methods": [ - "listTargets", - "listTargetsStream", - "listTargetsAsync" - ] - }, - "ListReleases": { - "methods": [ - "listReleases", - "listReleasesStream", - "listReleasesAsync" - ] - }, - "ListRollouts": { - "methods": [ - "listRollouts", - "listRolloutsStream", - "listRolloutsAsync" - ] - }, - "ListJobRuns": { - "methods": [ - "listJobRuns", - "listJobRunsStream", - "listJobRunsAsync" - ] - }, - "ListAutomations": { - "methods": [ - "listAutomations", - "listAutomationsStream", - "listAutomationsAsync" - ] - }, - "ListAutomationRuns": { - "methods": [ - "listAutomationRuns", - "listAutomationRunsStream", - "listAutomationRunsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts deleted file mode 100644 index f0f4a5919c7..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {CloudDeployClient} from './cloud_deploy_client'; diff --git a/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 726158e0ffb..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const deploy = require('@google-cloud/deploy'); - -function main() { - const cloudDeployClient = new deploy.CloudDeployClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index b5724129cb7..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {CloudDeployClient} from '@google-cloud/deploy'; - -// check that the client class type name can be used -function doStuffWithCloudDeployClient(client: CloudDeployClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const cloudDeployClient = new CloudDeployClient(); - doStuffWithCloudDeployClient(cloudDeployClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts b/owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts deleted file mode 100644 index c8f81b25a86..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts b/owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts deleted file mode 100644 index af2f7a6acdf..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/test/gapic_cloud_deploy_v1.ts +++ /dev/null @@ -1,6938 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as clouddeployModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos, IamProtos, LocationProtos} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); -} - -function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { - const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.CloudDeployClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = clouddeployModule.v1.CloudDeployClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = clouddeployModule.v1.CloudDeployClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = clouddeployModule.v1.CloudDeployClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new clouddeployModule.v1.CloudDeployClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudDeployStub, undefined); - await client.initialize(); - assert(client.cloudDeployStub); - }); - - it('has close method for the initialized client', done => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.cloudDeployStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudDeployStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new clouddeployModule.v1.CloudDeployClient({ - 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 clouddeployModule.v1.CloudDeployClient({ - 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('getDeliveryPipeline', () => { - it('invokes getDeliveryPipeline without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ); - client.innerApiCalls.getDeliveryPipeline = stubSimpleCall(expectedResponse); - const [response] = await client.getDeliveryPipeline(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDeliveryPipeline without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ); - client.innerApiCalls.getDeliveryPipeline = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDeliveryPipeline( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IDeliveryPipeline|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDeliveryPipeline with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDeliveryPipeline = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDeliveryPipeline(request), expectedError); - const actualRequest = (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDeliveryPipeline with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDeliveryPipeline(request), expectedError); - }); - }); - - describe('rollbackTarget', () => { - it('invokes rollbackTarget without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RollbackTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.RollbackTargetResponse() - ); - client.innerApiCalls.rollbackTarget = stubSimpleCall(expectedResponse); - const [response] = await client.rollbackTarget(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rollbackTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackTarget without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RollbackTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.RollbackTargetResponse() - ); - client.innerApiCalls.rollbackTarget = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rollbackTarget( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRollbackTargetResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rollbackTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackTarget with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RollbackTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rollbackTarget = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.rollbackTarget(request), expectedError); - const actualRequest = (client.innerApiCalls.rollbackTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rollbackTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rollbackTarget with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RollbackTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RollbackTargetRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.rollbackTarget(request), expectedError); - }); - }); - - describe('getTarget', () => { - it('invokes getTarget without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Target() - ); - client.innerApiCalls.getTarget = stubSimpleCall(expectedResponse); - const [response] = await client.getTarget(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTarget without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Target() - ); - client.innerApiCalls.getTarget = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTarget( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.ITarget|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTarget with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTarget = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getTarget(request), expectedError); - const actualRequest = (client.innerApiCalls.getTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTarget with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetTargetRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTarget(request), expectedError); - }); - }); - - describe('getRelease', () => { - it('invokes getRelease without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Release() - ); - client.innerApiCalls.getRelease = stubSimpleCall(expectedResponse); - const [response] = await client.getRelease(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRelease without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Release() - ); - client.innerApiCalls.getRelease = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRelease( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRelease|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRelease with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRelease = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRelease(request), expectedError); - const actualRequest = (client.innerApiCalls.getRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRelease with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getRelease(request), expectedError); - }); - }); - - describe('abandonRelease', () => { - it('invokes abandonRelease without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AbandonReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.AbandonReleaseResponse() - ); - client.innerApiCalls.abandonRelease = stubSimpleCall(expectedResponse); - const [response] = await client.abandonRelease(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.abandonRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonRelease without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AbandonReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.AbandonReleaseResponse() - ); - client.innerApiCalls.abandonRelease = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.abandonRelease( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAbandonReleaseResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.abandonRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonRelease with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AbandonReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.abandonRelease = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.abandonRelease(request), expectedError); - const actualRequest = (client.innerApiCalls.abandonRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonRelease with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AbandonReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AbandonReleaseRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.abandonRelease(request), expectedError); - }); - }); - - describe('approveRollout', () => { - it('invokes approveRollout without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ApproveRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.ApproveRolloutResponse() - ); - client.innerApiCalls.approveRollout = stubSimpleCall(expectedResponse); - const [response] = await client.approveRollout(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes approveRollout without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ApproveRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.ApproveRolloutResponse() - ); - client.innerApiCalls.approveRollout = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.approveRollout( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IApproveRolloutResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes approveRollout with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ApproveRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.approveRollout = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.approveRollout(request), expectedError); - const actualRequest = (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.approveRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes approveRollout with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ApproveRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ApproveRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.approveRollout(request), expectedError); - }); - }); - - describe('advanceRollout', () => { - it('invokes advanceRollout without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.AdvanceRolloutResponse() - ); - client.innerApiCalls.advanceRollout = stubSimpleCall(expectedResponse); - const [response] = await client.advanceRollout(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.advanceRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.advanceRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes advanceRollout without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.AdvanceRolloutResponse() - ); - client.innerApiCalls.advanceRollout = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.advanceRollout( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAdvanceRolloutResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.advanceRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.advanceRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes advanceRollout with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.advanceRollout = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.advanceRollout(request), expectedError); - const actualRequest = (client.innerApiCalls.advanceRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.advanceRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes advanceRollout with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.AdvanceRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.AdvanceRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.advanceRollout(request), expectedError); - }); - }); - - describe('cancelRollout', () => { - it('invokes cancelRollout without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelRolloutResponse() - ); - client.innerApiCalls.cancelRollout = stubSimpleCall(expectedResponse); - const [response] = await client.cancelRollout(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelRollout without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelRolloutResponse() - ); - client.innerApiCalls.cancelRollout = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.cancelRollout( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.ICancelRolloutResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelRollout with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.cancelRollout = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.cancelRollout(request), expectedError); - const actualRequest = (client.innerApiCalls.cancelRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelRollout with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.cancelRollout(request), expectedError); - }); - }); - - describe('getRollout', () => { - it('invokes getRollout without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Rollout() - ); - client.innerApiCalls.getRollout = stubSimpleCall(expectedResponse); - const [response] = await client.getRollout(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRollout without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Rollout() - ); - client.innerApiCalls.getRollout = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getRollout( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRollout|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRollout with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getRollout = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getRollout(request), expectedError); - const actualRequest = (client.innerApiCalls.getRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getRollout with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetRolloutRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getRollout(request), expectedError); - }); - }); - - describe('ignoreJob', () => { - it('invokes ignoreJob without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.IgnoreJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedHeaderRequestParams = `rollout=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.IgnoreJobResponse() - ); - client.innerApiCalls.ignoreJob = stubSimpleCall(expectedResponse); - const [response] = await client.ignoreJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.ignoreJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.ignoreJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes ignoreJob without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.IgnoreJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedHeaderRequestParams = `rollout=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.IgnoreJobResponse() - ); - client.innerApiCalls.ignoreJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.ignoreJob( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IIgnoreJobResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.ignoreJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.ignoreJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes ignoreJob with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.IgnoreJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedHeaderRequestParams = `rollout=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.ignoreJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.ignoreJob(request), expectedError); - const actualRequest = (client.innerApiCalls.ignoreJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.ignoreJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes ignoreJob with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.IgnoreJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.IgnoreJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.ignoreJob(request), expectedError); - }); - }); - - describe('retryJob', () => { - it('invokes retryJob without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RetryJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedHeaderRequestParams = `rollout=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.RetryJobResponse() - ); - client.innerApiCalls.retryJob = stubSimpleCall(expectedResponse); - const [response] = await client.retryJob(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.retryJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retryJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retryJob without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RetryJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedHeaderRequestParams = `rollout=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.RetryJobResponse() - ); - client.innerApiCalls.retryJob = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.retryJob( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRetryJobResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.retryJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retryJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retryJob with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RetryJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedHeaderRequestParams = `rollout=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.retryJob = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.retryJob(request), expectedError); - const actualRequest = (client.innerApiCalls.retryJob as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.retryJob as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes retryJob with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.RetryJobRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.RetryJobRequest', ['rollout']); - request.rollout = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.retryJob(request), expectedError); - }); - }); - - describe('getJobRun', () => { - it('invokes getJobRun without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.JobRun() - ); - client.innerApiCalls.getJobRun = stubSimpleCall(expectedResponse); - const [response] = await client.getJobRun(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJobRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJobRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJobRun without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.JobRun() - ); - client.innerApiCalls.getJobRun = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getJobRun( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IJobRun|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getJobRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJobRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJobRun with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getJobRun = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getJobRun(request), expectedError); - const actualRequest = (client.innerApiCalls.getJobRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getJobRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getJobRun with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getJobRun(request), expectedError); - }); - }); - - describe('terminateJobRun', () => { - it('invokes terminateJobRun without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.TerminateJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.TerminateJobRunResponse() - ); - client.innerApiCalls.terminateJobRun = stubSimpleCall(expectedResponse); - const [response] = await client.terminateJobRun(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.terminateJobRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.terminateJobRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes terminateJobRun without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.TerminateJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.TerminateJobRunResponse() - ); - client.innerApiCalls.terminateJobRun = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.terminateJobRun( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.ITerminateJobRunResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.terminateJobRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.terminateJobRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes terminateJobRun with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.TerminateJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.terminateJobRun = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.terminateJobRun(request), expectedError); - const actualRequest = (client.innerApiCalls.terminateJobRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.terminateJobRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes terminateJobRun with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.TerminateJobRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.TerminateJobRunRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.terminateJobRun(request), expectedError); - }); - }); - - describe('getConfig', () => { - it('invokes getConfig without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Config() - ); - client.innerApiCalls.getConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConfig without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Config() - ); - client.innerApiCalls.getConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConfig( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConfig with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConfig with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConfig(request), expectedError); - }); - }); - - describe('getAutomation', () => { - it('invokes getAutomation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Automation() - ); - client.innerApiCalls.getAutomation = stubSimpleCall(expectedResponse); - const [response] = await client.getAutomation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutomation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.Automation() - ); - client.innerApiCalls.getAutomation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAutomation( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutomation with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAutomation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAutomation(request), expectedError); - const actualRequest = (client.innerApiCalls.getAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutomation with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAutomation(request), expectedError); - }); - }); - - describe('getAutomationRun', () => { - it('invokes getAutomationRun without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.AutomationRun() - ); - client.innerApiCalls.getAutomationRun = stubSimpleCall(expectedResponse); - const [response] = await client.getAutomationRun(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAutomationRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutomationRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutomationRun without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.AutomationRun() - ); - client.innerApiCalls.getAutomationRun = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getAutomationRun( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomationRun|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getAutomationRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutomationRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutomationRun with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getAutomationRun = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getAutomationRun(request), expectedError); - const actualRequest = (client.innerApiCalls.getAutomationRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getAutomationRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getAutomationRun with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.GetAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.GetAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getAutomationRun(request), expectedError); - }); - }); - - describe('cancelAutomationRun', () => { - it('invokes cancelAutomationRun without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelAutomationRunResponse() - ); - client.innerApiCalls.cancelAutomationRun = stubSimpleCall(expectedResponse); - const [response] = await client.cancelAutomationRun(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelAutomationRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelAutomationRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelAutomationRun without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelAutomationRunResponse() - ); - client.innerApiCalls.cancelAutomationRun = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.cancelAutomationRun( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.ICancelAutomationRunResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.cancelAutomationRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelAutomationRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelAutomationRun with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.cancelAutomationRun = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.cancelAutomationRun(request), expectedError); - const actualRequest = (client.innerApiCalls.cancelAutomationRun as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.cancelAutomationRun as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes cancelAutomationRun with closed client', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.cancelAutomationRun(request), expectedError); - }); - }); - - describe('createDeliveryPipeline', () => { - it('invokes createDeliveryPipeline without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(expectedResponse); - const [operation] = await client.createDeliveryPipeline(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDeliveryPipeline without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createDeliveryPipeline( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDeliveryPipeline with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createDeliveryPipeline(request), expectedError); - const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createDeliveryPipeline with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createDeliveryPipeline(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDeliveryPipelineProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateDeliveryPipelineProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDeliveryPipelineProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateDeliveryPipelineProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDeliveryPipeline', () => { - it('invokes updateDeliveryPipeline without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() - ); - request.deliveryPipeline ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDeliveryPipeline(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDeliveryPipeline without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() - ); - request.deliveryPipeline ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDeliveryPipeline( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDeliveryPipeline with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() - ); - request.deliveryPipeline ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDeliveryPipeline(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDeliveryPipeline with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() - ); - request.deliveryPipeline ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', ['deliveryPipeline', 'name']); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDeliveryPipeline(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDeliveryPipelineProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkUpdateDeliveryPipelineProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDeliveryPipelineProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkUpdateDeliveryPipelineProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteDeliveryPipeline', () => { - it('invokes deleteDeliveryPipeline without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDeliveryPipeline(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDeliveryPipeline without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteDeliveryPipeline( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDeliveryPipeline with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteDeliveryPipeline(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteDeliveryPipeline with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteDeliveryPipeline(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteDeliveryPipeline as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteDeliveryPipelineProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkDeleteDeliveryPipelineProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteDeliveryPipelineProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkDeleteDeliveryPipelineProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createTarget', () => { - it('invokes createTarget without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createTarget = stubLongRunningCall(expectedResponse); - const [operation] = await client.createTarget(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTarget without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createTarget = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTarget( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTarget with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTarget = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createTarget(request), expectedError); - const actualRequest = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTarget with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateTargetRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTarget = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createTarget(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateTargetProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateTargetProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateTargetProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateTargetProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateTarget', () => { - it('invokes updateTarget without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() - ); - request.target ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateTarget = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateTarget(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTarget without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() - ); - request.target ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateTarget = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTarget( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTarget with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() - ); - request.target ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTarget = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateTarget(request), expectedError); - const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTarget with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() - ); - request.target ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateTargetRequest', ['target', 'name']); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTarget = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateTarget(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateTargetProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkUpdateTargetProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateTargetProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkUpdateTargetProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteTarget', () => { - it('invokes deleteTarget without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteTarget = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteTarget(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTarget without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteTarget = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTarget( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTarget with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTarget = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteTarget(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTarget with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteTargetRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTarget = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteTarget(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteTarget as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteTargetProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkDeleteTargetProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteTargetProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkDeleteTargetProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createRelease', () => { - it('invokes createRelease without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRelease = stubLongRunningCall(expectedResponse); - const [operation] = await client.createRelease(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRelease without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRelease = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRelease( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRelease with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRelease = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createRelease(request), expectedError); - const actualRequest = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRelease with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateReleaseRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRelease = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createRelease(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRelease as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateReleaseProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateReleaseProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateReleaseProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateReleaseProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createRollout', () => { - it('invokes createRollout without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRollout = stubLongRunningCall(expectedResponse); - const [operation] = await client.createRollout(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRollout without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createRollout = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createRollout( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRollout with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRollout = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createRollout(request), expectedError); - const actualRequest = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createRollout with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateRolloutRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createRollout = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createRollout(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createRollout as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateRolloutProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateRolloutProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateRolloutProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateRolloutProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createAutomation', () => { - it('invokes createAutomation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAutomation = stubLongRunningCall(expectedResponse); - const [operation] = await client.createAutomation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAutomation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createAutomation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createAutomation( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAutomation with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAutomation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createAutomation(request), expectedError); - const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createAutomation with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.CreateAutomationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAutomation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createAutomation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateAutomationProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateAutomationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateAutomationProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateAutomationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateAutomation', () => { - it('invokes updateAutomation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateAutomationRequest() - ); - request.automation ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); - request.automation.name = defaultValue1; - const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAutomation = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateAutomation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAutomation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateAutomationRequest() - ); - request.automation ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); - request.automation.name = defaultValue1; - const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateAutomation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateAutomation( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAutomation with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateAutomationRequest() - ); - request.automation ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); - request.automation.name = defaultValue1; - const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAutomation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateAutomation(request), expectedError); - const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateAutomation with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateAutomationRequest() - ); - request.automation ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.UpdateAutomationRequest', ['automation', 'name']); - request.automation.name = defaultValue1; - const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateAutomation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateAutomation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateAutomationProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkUpdateAutomationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateAutomationProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkUpdateAutomationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteAutomation', () => { - it('invokes deleteAutomation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAutomation = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteAutomation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAutomation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteAutomation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteAutomation( - request, - (err?: Error|null, - result?: LROperation|null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAutomation with call error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAutomation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteAutomation(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteAutomation with LRO error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteAutomationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.DeleteAutomationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteAutomation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteAutomation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteAutomation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteAutomationProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkDeleteAutomationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteAutomationProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkDeleteAutomationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listDeliveryPipelines', () => { - it('invokes listDeliveryPipelines without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - ]; - client.innerApiCalls.listDeliveryPipelines = stubSimpleCall(expectedResponse); - const [response] = await client.listDeliveryPipelines(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDeliveryPipelines without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - ]; - client.innerApiCalls.listDeliveryPipelines = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDeliveryPipelines( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IDeliveryPipeline[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDeliveryPipelines with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDeliveryPipelines = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDeliveryPipelines(request), expectedError); - const actualRequest = (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDeliveryPipelines as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDeliveryPipelinesStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - ]; - client.descriptors.page.listDeliveryPipelines.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDeliveryPipelinesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { - 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.listDeliveryPipelines.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDeliveryPipelines, request)); - assert( - (client.descriptors.page.listDeliveryPipelines.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDeliveryPipelinesStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDeliveryPipelines.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDeliveryPipelinesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDeliveryPipelines.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDeliveryPipelines, request)); - assert( - (client.descriptors.page.listDeliveryPipelines.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDeliveryPipelines without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - generateSampleMessage(new protos.google.cloud.deploy.v1.DeliveryPipeline()), - ]; - client.descriptors.page.listDeliveryPipelines.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; - const iterable = client.listDeliveryPipelinesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDeliveryPipelines with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDeliveryPipelines.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDeliveryPipelinesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDeliveryPipelines.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTargets', () => { - it('invokes listTargets without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - ]; - client.innerApiCalls.listTargets = stubSimpleCall(expectedResponse); - const [response] = await client.listTargets(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTargets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTargets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTargets without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - ]; - client.innerApiCalls.listTargets = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTargets( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.ITarget[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listTargets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTargets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTargets with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTargets = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTargets(request), expectedError); - const actualRequest = (client.innerApiCalls.listTargets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listTargets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTargetsStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - ]; - client.descriptors.page.listTargets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTargetsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Target[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { - 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.listTargets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTargets, request)); - assert( - (client.descriptors.page.listTargets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTargetsStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTargets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listTargetsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Target[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listTargets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listTargets, request)); - assert( - (client.descriptors.page.listTargets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTargets without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - ]; - client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.ITarget[] = []; - const iterable = client.listTargetsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTargets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTargets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTargets with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListTargetsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTargetsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.ITarget[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTargets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listTargets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listReleases', () => { - it('invokes listReleases without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - ]; - client.innerApiCalls.listReleases = stubSimpleCall(expectedResponse); - const [response] = await client.listReleases(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listReleases as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReleases as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReleases without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - ]; - client.innerApiCalls.listReleases = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listReleases( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRelease[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listReleases as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReleases as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReleases with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listReleases = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listReleases(request), expectedError); - const actualRequest = (client.innerApiCalls.listReleases as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listReleases as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listReleasesStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - ]; - client.descriptors.page.listReleases.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listReleasesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Release[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { - 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.listReleases.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listReleases, request)); - assert( - (client.descriptors.page.listReleases.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listReleasesStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listReleases.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listReleasesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Release[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listReleases.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listReleases, request)); - assert( - (client.descriptors.page.listReleases.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listReleases without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - ]; - client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IRelease[] = []; - const iterable = client.listReleasesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listReleases.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listReleases.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listReleases with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListReleasesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listReleasesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IRelease[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listReleases.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listReleases.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listRollouts', () => { - it('invokes listRollouts without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - ]; - client.innerApiCalls.listRollouts = stubSimpleCall(expectedResponse); - const [response] = await client.listRollouts(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRollouts without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - ]; - client.innerApiCalls.listRollouts = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listRollouts( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IRollout[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRollouts with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listRollouts = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listRollouts(request), expectedError); - const actualRequest = (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listRollouts as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listRolloutsStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - ]; - client.descriptors.page.listRollouts.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRolloutsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Rollout[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { - 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.listRollouts.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRollouts, request)); - assert( - (client.descriptors.page.listRollouts.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listRolloutsStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listRollouts.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listRolloutsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Rollout[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listRollouts.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listRollouts, request)); - assert( - (client.descriptors.page.listRollouts.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRollouts without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - ]; - client.descriptors.page.listRollouts.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IRollout[] = []; - const iterable = client.listRolloutsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listRollouts.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRollouts.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listRollouts with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListRolloutsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listRollouts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRolloutsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IRollout[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listRollouts.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listRollouts.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listJobRuns', () => { - it('invokes listJobRuns without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - ]; - client.innerApiCalls.listJobRuns = stubSimpleCall(expectedResponse); - const [response] = await client.listJobRuns(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listJobRuns as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listJobRuns as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listJobRuns without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - ]; - client.innerApiCalls.listJobRuns = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listJobRuns( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IJobRun[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listJobRuns as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listJobRuns as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listJobRuns with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listJobRuns = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listJobRuns(request), expectedError); - const actualRequest = (client.innerApiCalls.listJobRuns as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listJobRuns as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listJobRunsStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - ]; - client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listJobRunsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.JobRun[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { - 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.listJobRuns.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listJobRuns, request)); - assert( - (client.descriptors.page.listJobRuns.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listJobRunsStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listJobRunsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.JobRun[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listJobRuns.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listJobRuns, request)); - assert( - (client.descriptors.page.listJobRuns.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listJobRuns without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - ]; - client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; - const iterable = client.listJobRunsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listJobRuns with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListJobRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listJobRunsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAutomations', () => { - it('invokes listAutomations without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - ]; - client.innerApiCalls.listAutomations = stubSimpleCall(expectedResponse); - const [response] = await client.listAutomations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAutomations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAutomations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAutomations without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - ]; - client.innerApiCalls.listAutomations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAutomations( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomation[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAutomations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAutomations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAutomations with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAutomations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAutomations(request), expectedError); - const actualRequest = (client.innerApiCalls.listAutomations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAutomations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAutomationsStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - ]; - client.descriptors.page.listAutomations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAutomationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Automation[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Automation) => { - 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.listAutomations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAutomations, request)); - assert( - (client.descriptors.page.listAutomations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAutomationsStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAutomations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAutomationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Automation[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Automation) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAutomations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAutomations, request)); - assert( - (client.descriptors.page.listAutomations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAutomations without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), - ]; - client.descriptors.page.listAutomations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IAutomation[] = []; - const iterable = client.listAutomationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAutomations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAutomations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAutomations with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAutomations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAutomationsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IAutomation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAutomations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAutomations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listAutomationRuns', () => { - it('invokes listAutomationRuns without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - ]; - client.innerApiCalls.listAutomationRuns = stubSimpleCall(expectedResponse); - const [response] = await client.listAutomationRuns(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAutomationRuns as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAutomationRuns as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAutomationRuns without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - ]; - client.innerApiCalls.listAutomationRuns = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listAutomationRuns( - request, - (err?: Error|null, result?: protos.google.cloud.deploy.v1.IAutomationRun[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listAutomationRuns as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAutomationRuns as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAutomationRuns with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listAutomationRuns = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listAutomationRuns(request), expectedError); - const actualRequest = (client.innerApiCalls.listAutomationRuns as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listAutomationRuns as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listAutomationRunsStream without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - ]; - client.descriptors.page.listAutomationRuns.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAutomationRunsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.AutomationRun[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.AutomationRun) => { - 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.listAutomationRuns.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAutomationRuns, request)); - assert( - (client.descriptors.page.listAutomationRuns.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listAutomationRunsStream with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAutomationRuns.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAutomationRunsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.AutomationRun[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.AutomationRun) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listAutomationRuns.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listAutomationRuns, request)); - assert( - (client.descriptors.page.listAutomationRuns.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAutomationRuns without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.AutomationRun()), - ]; - client.descriptors.page.listAutomationRuns.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IAutomationRun[] = []; - const iterable = client.listAutomationRunsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listAutomationRuns with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listAutomationRuns.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAutomationRunsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IAutomationRun[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.getIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getIamPolicy without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0)); - }); - it('invokes getIamPolicy with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.setIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes setIamPolicy without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() - ); - client.iamClient.setIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0)); - }); - it('invokes setIamPolicy with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.SetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.setIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.setIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); - const response = await client.testIamPermissions(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes testIamPermissions without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsResponse() - ); - client.iamClient.testIamPermissions = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.TestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0)); - }); - it('invokes testIamPermissions with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new IamProtos.google.iam.v1.TestIamPermissionsRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.iamClient.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request, expectedOptions), expectedError); - assert((client.iamClient.testIamPermissions as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - it('invokes getLocation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getLocation(request, expectedOptions), expectedError); - assert((client.locationsClient.getLocation as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes getOperation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.getOperation(request)}, expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes cancelOperation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0)); - }); - it('invokes cancelOperation with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); - assert((client.operationsClient.cancelOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request) - ); - }); - it('invokes deleteOperation without error using callback', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); - assert((client.operationsClient.deleteOperation as SinonStub) - .getCall(0).calledWith(request)); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - }); - }); - - describe('Path templates', () => { - - describe('automation', () => { - const fakePath = "/rendered/path/automation"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - delivery_pipeline: "deliveryPipelineValue", - automation: "automationValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.automationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.automationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('automationPath', () => { - const result = client.automationPath("projectValue", "locationValue", "deliveryPipelineValue", "automationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.automationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAutomationName', () => { - const result = client.matchProjectFromAutomationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.automationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAutomationName', () => { - const result = client.matchLocationFromAutomationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.automationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeliveryPipelineFromAutomationName', () => { - const result = client.matchDeliveryPipelineFromAutomationName(fakePath); - assert.strictEqual(result, "deliveryPipelineValue"); - assert((client.pathTemplates.automationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAutomationFromAutomationName', () => { - const result = client.matchAutomationFromAutomationName(fakePath); - assert.strictEqual(result, "automationValue"); - assert((client.pathTemplates.automationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('automationRun', () => { - const fakePath = "/rendered/path/automationRun"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - delivery_pipeline: "deliveryPipelineValue", - automation_run: "automationRunValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.automationRunPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.automationRunPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('automationRunPath', () => { - const result = client.automationRunPath("projectValue", "locationValue", "deliveryPipelineValue", "automationRunValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.automationRunPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromAutomationRunName', () => { - const result = client.matchProjectFromAutomationRunName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromAutomationRunName', () => { - const result = client.matchLocationFromAutomationRunName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeliveryPipelineFromAutomationRunName', () => { - const result = client.matchDeliveryPipelineFromAutomationRunName(fakePath); - assert.strictEqual(result, "deliveryPipelineValue"); - assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchAutomationRunFromAutomationRunName', () => { - const result = client.matchAutomationRunFromAutomationRunName(fakePath); - assert.strictEqual(result, "automationRunValue"); - assert((client.pathTemplates.automationRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('build', () => { - const fakePath = "/rendered/path/build"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - build: "buildValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.buildPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.buildPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('buildPath', () => { - const result = client.buildPath("projectValue", "locationValue", "buildValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.buildPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBuildName', () => { - const result = client.matchProjectFromBuildName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.buildPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBuildName', () => { - const result = client.matchLocationFromBuildName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.buildPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBuildFromBuildName', () => { - const result = client.matchBuildFromBuildName(fakePath); - assert.strictEqual(result, "buildValue"); - assert((client.pathTemplates.buildPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('cluster', () => { - const fakePath = "/rendered/path/cluster"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - cluster: "clusterValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.clusterPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.clusterPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('clusterPath', () => { - const result = client.clusterPath("projectValue", "locationValue", "clusterValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.clusterPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromClusterName', () => { - const result = client.matchProjectFromClusterName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.clusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromClusterName', () => { - const result = client.matchLocationFromClusterName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.clusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchClusterFromClusterName', () => { - const result = client.matchClusterFromClusterName(fakePath); - assert.strictEqual(result, "clusterValue"); - assert((client.pathTemplates.clusterPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('config', () => { - const fakePath = "/rendered/path/config"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.configPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.configPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('configPath', () => { - const result = client.configPath("projectValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.configPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConfigName', () => { - const result = client.matchProjectFromConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.configPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromConfigName', () => { - const result = client.matchLocationFromConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.configPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('deliveryPipeline', () => { - const fakePath = "/rendered/path/deliveryPipeline"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - delivery_pipeline: "deliveryPipelineValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.deliveryPipelinePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.deliveryPipelinePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('deliveryPipelinePath', () => { - const result = client.deliveryPipelinePath("projectValue", "locationValue", "deliveryPipelineValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.deliveryPipelinePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDeliveryPipelineName', () => { - const result = client.matchProjectFromDeliveryPipelineName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDeliveryPipelineName', () => { - const result = client.matchLocationFromDeliveryPipelineName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeliveryPipelineFromDeliveryPipelineName', () => { - const result = client.matchDeliveryPipelineFromDeliveryPipelineName(fakePath); - assert.strictEqual(result, "deliveryPipelineValue"); - assert((client.pathTemplates.deliveryPipelinePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('job', () => { - const fakePath = "/rendered/path/job"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - job: "jobValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobPath', () => { - const result = client.jobPath("projectValue", "locationValue", "jobValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobName', () => { - const result = client.matchProjectFromJobName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobName', () => { - const result = client.matchLocationFromJobName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobFromJobName', () => { - const result = client.matchJobFromJobName(fakePath); - assert.strictEqual(result, "jobValue"); - assert((client.pathTemplates.jobPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('jobRun', () => { - const fakePath = "/rendered/path/jobRun"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - delivery_pipeline: "deliveryPipelineValue", - release: "releaseValue", - rollout: "rolloutValue", - job_run: "jobRunValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.jobRunPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.jobRunPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('jobRunPath', () => { - const result = client.jobRunPath("projectValue", "locationValue", "deliveryPipelineValue", "releaseValue", "rolloutValue", "jobRunValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.jobRunPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromJobRunName', () => { - const result = client.matchProjectFromJobRunName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromJobRunName', () => { - const result = client.matchLocationFromJobRunName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeliveryPipelineFromJobRunName', () => { - const result = client.matchDeliveryPipelineFromJobRunName(fakePath); - assert.strictEqual(result, "deliveryPipelineValue"); - assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchReleaseFromJobRunName', () => { - const result = client.matchReleaseFromJobRunName(fakePath); - assert.strictEqual(result, "releaseValue"); - assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRolloutFromJobRunName', () => { - const result = client.matchRolloutFromJobRunName(fakePath); - assert.strictEqual(result, "rolloutValue"); - assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchJobRunFromJobRunName', () => { - const result = client.matchJobRunFromJobRunName(fakePath); - assert.strictEqual(result, "jobRunValue"); - assert((client.pathTemplates.jobRunPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - 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('membership', () => { - const fakePath = "/rendered/path/membership"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - membership: "membershipValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.membershipPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.membershipPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('membershipPath', () => { - const result = client.membershipPath("projectValue", "locationValue", "membershipValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.membershipPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromMembershipName', () => { - const result = client.matchProjectFromMembershipName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.membershipPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromMembershipName', () => { - const result = client.matchLocationFromMembershipName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.membershipPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchMembershipFromMembershipName', () => { - const result = client.matchMembershipFromMembershipName(fakePath); - assert.strictEqual(result, "membershipValue"); - assert((client.pathTemplates.membershipPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - 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('release', () => { - const fakePath = "/rendered/path/release"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - delivery_pipeline: "deliveryPipelineValue", - release: "releaseValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.releasePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.releasePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('releasePath', () => { - const result = client.releasePath("projectValue", "locationValue", "deliveryPipelineValue", "releaseValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.releasePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromReleaseName', () => { - const result = client.matchProjectFromReleaseName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.releasePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromReleaseName', () => { - const result = client.matchLocationFromReleaseName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.releasePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeliveryPipelineFromReleaseName', () => { - const result = client.matchDeliveryPipelineFromReleaseName(fakePath); - assert.strictEqual(result, "deliveryPipelineValue"); - assert((client.pathTemplates.releasePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchReleaseFromReleaseName', () => { - const result = client.matchReleaseFromReleaseName(fakePath); - assert.strictEqual(result, "releaseValue"); - assert((client.pathTemplates.releasePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('rollout', () => { - const fakePath = "/rendered/path/rollout"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - delivery_pipeline: "deliveryPipelineValue", - release: "releaseValue", - rollout: "rolloutValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.rolloutPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.rolloutPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('rolloutPath', () => { - const result = client.rolloutPath("projectValue", "locationValue", "deliveryPipelineValue", "releaseValue", "rolloutValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.rolloutPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromRolloutName', () => { - const result = client.matchProjectFromRolloutName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromRolloutName', () => { - const result = client.matchLocationFromRolloutName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDeliveryPipelineFromRolloutName', () => { - const result = client.matchDeliveryPipelineFromRolloutName(fakePath); - assert.strictEqual(result, "deliveryPipelineValue"); - assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchReleaseFromRolloutName', () => { - const result = client.matchReleaseFromRolloutName(fakePath); - assert.strictEqual(result, "releaseValue"); - assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchRolloutFromRolloutName', () => { - const result = client.matchRolloutFromRolloutName(fakePath); - assert.strictEqual(result, "rolloutValue"); - assert((client.pathTemplates.rolloutPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('service', () => { - const fakePath = "/rendered/path/service"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - service: "serviceValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.servicePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.servicePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('servicePath', () => { - const result = client.servicePath("projectValue", "locationValue", "serviceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.servicePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromServiceName', () => { - const result = client.matchProjectFromServiceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.servicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromServiceName', () => { - const result = client.matchLocationFromServiceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.servicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchServiceFromServiceName', () => { - const result = client.matchServiceFromServiceName(fakePath); - assert.strictEqual(result, "serviceValue"); - assert((client.pathTemplates.servicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('target', () => { - const fakePath = "/rendered/path/target"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - target: "targetValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.targetPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.targetPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('targetPath', () => { - const result = client.targetPath("projectValue", "locationValue", "targetValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.targetPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromTargetName', () => { - const result = client.matchProjectFromTargetName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.targetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromTargetName', () => { - const result = client.matchLocationFromTargetName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.targetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTargetFromTargetName', () => { - const result = client.matchTargetFromTargetName(fakePath); - assert.strictEqual(result, "targetValue"); - assert((client.pathTemplates.targetPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('workerPool', () => { - const fakePath = "/rendered/path/workerPool"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - worker_pool: "workerPoolValue", - }; - const client = new clouddeployModule.v1.CloudDeployClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-deploy/v1/tsconfig.json b/owl-bot-staging/google-cloud-deploy/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-deploy/v1/webpack.config.js b/owl-bot-staging/google-cloud-deploy/v1/webpack.config.js deleted file mode 100644 index 0cdbeb51267..00000000000 --- a/owl-bot-staging/google-cloud-deploy/v1/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'CloudDeploy', - filename: './cloud-deploy.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-cloud-deploy/README.md b/packages/google-cloud-deploy/README.md index ca16649dca6..b73c39a9339 100644 --- a/packages/google-cloud-deploy/README.md +++ b/packages/google-cloud-deploy/README.md @@ -123,13 +123,18 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Cloud_deploy.abandon_release | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.advance_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.advance_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.advance_rollout.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.approve_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.cancel_automation_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.cancel_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.create_automation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.create_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.create_release | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.create_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.create_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.delete_automation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.delete_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.delete_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.get_automation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.get_automation_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.get_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.get_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.get_job_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js,packages/google-cloud-deploy/samples/README.md) | @@ -137,13 +142,17 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Cloud_deploy.get_rollout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.get_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.ignore_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.ignore_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.ignore_job.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.list_automation_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.list_automations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.list_delivery_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.list_job_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_job_runs.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.list_releases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_releases.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.list_rollouts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_rollouts.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.list_targets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.retry_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.rollback_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.terminate_job_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js,packages/google-cloud-deploy/samples/README.md) | +| Cloud_deploy.update_automation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.update_delivery_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js,packages/google-cloud-deploy/samples/README.md) | | Cloud_deploy.update_target | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_target.js,packages/google-cloud-deploy/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/quickstart.js,packages/google-cloud-deploy/samples/README.md) | diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automation_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/automation_payload.proto similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automation_payload.proto rename to packages/google-cloud-deploy/protos/google/cloud/deploy/v1/automation_payload.proto diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automationrun_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/automationrun_payload.proto similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/automationrun_payload.proto rename to packages/google-cloud-deploy/protos/google/cloud/deploy/v1/automationrun_payload.proto diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto index b930b9a5b66..c6e5782a37c 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -55,6 +55,10 @@ option (google.api.resource_definition) = { type: "run.googleapis.com/Service" pattern: "projects/{project}/locations/{location}/services/{service}" }; +option (google.api.resource_definition) = { + type: "run.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" +}; // CloudDeploy service creates and manages Continuous Delivery operations // on Google Cloud Platform via Skaffold (https://skaffold.dev). @@ -131,6 +135,15 @@ service CloudDeploy { option (google.api.method_signature) = "parent"; } + // Creates a `Rollout` to roll back the specified target. + rpc RollbackTarget(RollbackTargetRequest) returns (RollbackTargetResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget" + body: "*" + }; + option (google.api.method_signature) = "name,target_id,rollout_id"; + } + // Gets details of a single Target. rpc GetTarget(GetTargetRequest) returns (Target) { option (google.api.http) = { @@ -324,6 +337,94 @@ service CloudDeploy { }; option (google.api.method_signature) = "name"; } + + // Creates a new Automation in a given project and location. + rpc CreateAutomation(CreateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + body: "automation" + }; + option (google.api.method_signature) = "parent,automation,automation_id"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Automation resource. + rpc UpdateAutomation(UpdateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + body: "automation" + }; + option (google.api.method_signature) = "automation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Automation resource. + rpc DeleteAutomation(DeleteAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Automation. + rpc GetAutomation(GetAutomationRequest) returns (Automation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Automations in a given project and location. + rpc ListAutomations(ListAutomationsRequest) + returns (ListAutomationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AutomationRun. + rpc GetAutomationRun(GetAutomationRunRequest) returns (AutomationRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists AutomationRuns in a given project and location. + rpc ListAutomationRuns(ListAutomationRunsRequest) + returns (ListAutomationRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels an AutomationRun. The `state` of the `AutomationRun` after + // cancelling is `CANCELLED`. `CancelAutomationRun` can be called on + // AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun + // in a different state returns an `FAILED_PRECONDITION` error. + rpc CancelAutomationRun(CancelAutomationRunRequest) + returns (CancelAutomationRunResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } } // A `DeliveryPipeline` resource in the Cloud Deploy API. @@ -336,8 +437,8 @@ message DeliveryPipeline { pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" }; - // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `DeliveryPipeline`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `DeliveryPipeline`. @@ -448,14 +549,14 @@ message Strategy { // Predeploy contains the predeploy job configuration information. message Predeploy { - // Optional. A sequence of skaffold custom actions to invoke during execution + // Optional. A sequence of Skaffold custom actions to invoke during execution // of the predeploy job. repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; } // Postdeploy contains the postdeploy job configuration information. message Postdeploy { - // Optional. A sequence of skaffold custom actions to invoke during execution + // Optional. A sequence of Skaffold custom actions to invoke during execution // of the postdeploy job. repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; } @@ -504,11 +605,11 @@ message CanaryDeployment { bool verify = 2; // Optional. Configuration for the predeploy job of the first phase. If this - // is not configured, predeploy job will not be present. + // is not configured, there will be no predeploy job for this phase. Predeploy predeploy = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the postdeploy job of the last phase. If this - // is not configured, postdeploy job will not be present. + // is not configured, there will be no postdeploy job for this phase. Postdeploy postdeploy = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -537,11 +638,11 @@ message CustomCanaryDeployment { bool verify = 4; // Optional. Configuration for the predeploy job of this phase. If this is - // not configured, predeploy job will not be present for this phase. + // not configured, there will be no predeploy job for this phase. Predeploy predeploy = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the postdeploy job of this phase. If this is - // not configured, postdeploy job will not be present for this phase. + // not configured, there will be no postdeploy job for this phase. Postdeploy postdeploy = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -641,7 +742,7 @@ message TargetsPresentCondition { bool status = 1; // The list of Target names that do not exist. For example, - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. repeated string missing_targets = 2 [(google.api.resource_reference) = { type: "clouddeploy.googleapis.com/Target" }]; @@ -678,7 +779,7 @@ message PipelineCondition { // The request object for `ListDeliveryPipelines`. message ListDeliveryPipelinesRequest { // Required. The parent, which owns this collection of pipelines. Format must - // be projects/{project_id}/locations/{location_name}. + // be `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -723,7 +824,7 @@ message ListDeliveryPipelinesResponse { // The request object for `GetDeliveryPipeline` message GetDeliveryPipelineRequest { // Required. Name of the `DeliveryPipeline`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -735,7 +836,8 @@ message GetDeliveryPipelineRequest { // The request object for `CreateDeliveryPipeline`. message CreateDeliveryPipelineRequest { // Required. The parent collection in which the `DeliveryPipeline` should be - // created. Format should be projects/{project_id}/locations/{location_name}. + // created. Format should be + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -811,7 +913,7 @@ message UpdateDeliveryPipelineRequest { // The request object for `DeleteDeliveryPipeline`. message DeleteDeliveryPipelineRequest { // Required. The name of the `DeliveryPipeline` to delete. Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -853,6 +955,58 @@ message DeleteDeliveryPipelineRequest { string etag = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Configs for the Rollback rollout. +message RollbackTargetConfig { + // Optional. The rollback `Rollout` to create. + Rollout rollout = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string starting_phase_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `RollbackTarget`. +message RollbackTargetRequest { + // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Target` that is being rolled back. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the rollback `Rollout` to create. + string rollout_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. ID of the `Release` to roll back to. If this isn't specified, the + // previous successful `Rollout` to the specified target will be used to + // determine the `Release`. + string release_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, this must be the latest `Rollout` that is on the + // `Target`. + string rollout_to_roll_back = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configs for the rollback `Rollout`. + RollbackTargetConfig rollback_config = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with a `RollbackTargetResponse`. + bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `RollbackTarget`. +message RollbackTargetResponse { + // The config of the rollback `Rollout` created or will be created. + RollbackTargetConfig rollback_config = 1; +} + // A `Target` resource in the Cloud Deploy API. // // A `Target` defines a location to which a Skaffold configuration @@ -864,7 +1018,7 @@ message Target { }; // Optional. Name of the `Target`. Format is - // projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}. + // `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Resource id of the `Target`. @@ -1046,7 +1200,7 @@ message PrivatePool { // Information specifying a GKE Cluster. message GkeCluster { // Information specifying a GKE Cluster. Format is - // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}. + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. string cluster = 1 [(google.api.resource_reference) = { type: "container.googleapis.com/Cluster" }]; @@ -1093,7 +1247,7 @@ message MultiTarget { // The request object for `ListTargets`. message ListTargetsRequest { // Required. The parent, which owns this collection of targets. Format must be - // projects/{project_id}/locations/{location_name}. + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1139,7 +1293,7 @@ message ListTargetsResponse { // The request object for `GetTarget`. message GetTargetRequest { // Required. Name of the `Target`. Format must be - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1152,7 +1306,7 @@ message GetTargetRequest { message CreateTargetRequest { // Required. The parent collection in which the `Target` should be created. // Format should be - // projects/{project_id}/locations/{location_name}. + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1226,7 +1380,7 @@ message UpdateTargetRequest { // The request object for `DeleteTarget`. message DeleteTargetRequest { // Required. The name of the `Target` to delete. Format should be - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1263,6 +1417,22 @@ message DeleteTargetRequest { string etag = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Contains criteria for selecting Targets. Attributes provided must match the +// target resource in order for policy restrictions to apply. E.g. if id "prod" +// and labels "foo: bar" are given the target resource must match both that id +// and have that label in order to be selected. +message TargetAttribute { + // ID of the `Target`. The value of this field could be one of the + // following: + // * The last segment of a target name. It only needs the ID to determine + // which target is being referred to + // * "*", all targets in a location. + string id = 1; + + // Target labels. + map labels = 2; +} + // A `Release` resource in the Cloud Deploy API. // // A `Release` defines a specific Skaffold configuration instance @@ -1323,6 +1493,11 @@ message Release { // failure_message for additional details. CLOUD_BUILD_REQUEST_FAILED = 3; + // The render operation did not complete successfully because the + // verification stanza required for verify was not found on the skaffold + // configuration. + VERIFICATION_CONFIG_NOT_FOUND = 4; + // The render operation did not complete successfully because the custom // action required for predeploy or postdeploy was not found in the // skaffold configuration. See failure_message for additional details. @@ -1394,9 +1569,8 @@ message Release { SkaffoldSupportedCondition skaffold_supported_condition = 2; } - // Optional. Name of the `Release`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Release`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `Release`. @@ -1551,7 +1725,7 @@ message DeployArtifact { // `Release` render. message CloudRunRenderMetadata { // Output only. The name of the Cloud Run Service in the rendered manifest. - // Format is projects/{project}/locations/{location}/services/{service}. + // Format is `projects/{project}/locations/{location}/services/{service}`. string service = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "run.googleapis.com/Service" } @@ -1614,7 +1788,7 @@ message ListReleasesResponse { // The request object for `GetRelease`. message GetReleaseRequest { // Required. Name of the `Release`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1627,7 +1801,7 @@ message GetReleaseRequest { message CreateReleaseRequest { // Required. The parent collection in which the `Release` should be created. // Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1756,9 +1930,8 @@ message Rollout { CLOUD_BUILD_REQUEST_FAILED = 7; } - // Optional. Name of the `Rollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Rollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `Rollout`. @@ -1845,10 +2018,17 @@ message Rollout { // Output only. Metadata contains information about the rollout. Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Name of the `ControllerRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ControllerRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string controller_rollout = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the `Rollout` that is rolled back by this `Rollout`. + // Empty if this `Rollout` wasn't created as a rollback. + string rollback_of_rollout = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Names of `Rollouts` that rolled back this `Rollout`. + repeated string rolled_back_by_rollouts = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata includes information associated with a `Rollout`. @@ -1856,6 +2036,11 @@ message Metadata { // Output only. The name of the Cloud Run Service that is associated with a // `Rollout`. CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AutomationRolloutMetadata contains the information about the + // interactions between Automation service and this rollout. + AutomationRolloutMetadata automation = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to @@ -1870,7 +2055,7 @@ message DeployJobRunMetadata { message CloudRunMetadata { // Output only. The name of the Cloud Run Service that is associated with a // `Rollout`. Format is - // projects/{project}/locations/{location}/services/{service}. + // `projects/{project}/locations/{location}/services/{service}`. string service = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "run.googleapis.com/Service" } @@ -1882,6 +2067,32 @@ message CloudRunMetadata { // Output only. The Cloud Run Revision id associated with a `Rollout`. string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Cloud Run job that is associated with a + // `Rollout`. Format is + // `projects/{project}/locations/{location}/jobs/{job_name}`. + string job = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } + ]; +} + +// AutomationRolloutMetadata contains Automation-related actions that +// were performed on a rollout. +message AutomationRolloutMetadata { + // Output only. The ID of the AutomationRun initiated by a promote release + // rule. + string promote_automation_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by an advance rollout + // rule. + repeated string advance_automation_runs = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by a repair rollout + // rule. + repeated string repair_automation_runs = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Phase represents a collection of jobs that are logically grouped together @@ -1941,12 +2152,10 @@ message DeploymentJobs { // Output only. The verify Job. Runs after a deploy if the deploy succeeds. Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The predeploy Job. This is the predeploy job in the phase. - // This is the first job of the phase. + // Output only. The predeploy Job, which is the first job on the phase. Job predeploy_job = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The postdeploy Job. This is the postdeploy job in the phase. - // This is the last job of the phase. + // Output only. The postdeploy Job, which is the last job on the phase. Job postdeploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -2109,7 +2318,7 @@ message ListRolloutsResponse { // GetRolloutRequest is the request object used by `GetRollout`. message GetRolloutRequest { // Required. Name of the `Rollout`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2122,7 +2331,7 @@ message GetRolloutRequest { message CreateRolloutRequest { // Required. The parent collection in which the `Rollout` should be created. // Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2193,8 +2402,7 @@ message OperationMetadata { // The request object used by `ApproveRollout`. message ApproveRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2212,8 +2420,7 @@ message ApproveRolloutResponse {} // The request object used by `AdvanceRollout`. message AdvanceRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2231,8 +2438,7 @@ message AdvanceRolloutResponse {} // The request object used by `CancelRollout`. message CancelRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2247,8 +2453,7 @@ message CancelRolloutResponse {} // The request object used by `IgnoreJob`. message IgnoreJobRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string rollout = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2269,8 +2474,7 @@ message IgnoreJobResponse {} // RetryJobRequest is the request object used by `RetryJob`. message RetryJobRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string rollout = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2291,8 +2495,7 @@ message RetryJobResponse {} // The request object used by `AbandonRelease`. message AbandonReleaseRequest { // Required. Name of the Release. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2335,9 +2538,7 @@ message JobRun { } // Optional. Name of the `JobRun`. Format is - // projects/{project}/locations/{location}/ - // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ - // {rollouts}/jobRuns/{uuid}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `JobRun`. @@ -2412,7 +2613,7 @@ message DeployJobRun { // logs. EXECUTION_FAILED = 2; - // The deploy build did not complete within the alloted time. + // The deploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // There were missing resources in the runtime environment required for a @@ -2426,7 +2627,7 @@ message DeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to deploy. Format is - // projects/{project}/locations/{location}/builds/{build}. + // `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2464,7 +2665,7 @@ message VerifyJobRun { // logs. EXECUTION_FAILED = 2; - // The verify build did not complete within the alloted time. + // The verify job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // No Skaffold verify configuration was found. @@ -2477,7 +2678,7 @@ message VerifyJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to verify. Format is - // projects/{project}/locations/{location}/builds/{build}. + // `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2517,7 +2718,7 @@ message PredeployJobRun { // logs. EXECUTION_FAILED = 2; - // The predeploy build did not complete within the alloted time. + // The predeploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message @@ -2527,7 +2728,7 @@ message PredeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to execute the custom actions associated with the predeploy Job. - // Format is projects/{project}/locations/{location}/builds/{build}. + // Format is `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2560,7 +2761,7 @@ message PostdeployJobRun { // logs. EXECUTION_FAILED = 2; - // The postdeploy build did not complete within the alloted time. + // The postdeploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message @@ -2570,7 +2771,7 @@ message PostdeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to execute the custom actions associated with the postdeploy Job. - // Format is projects/{project}/locations/{location}/builds/{build}. + // Format is `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2590,9 +2791,8 @@ message PostdeployJobRun { // CreateChildRolloutJobRun contains information specific to a // createChildRollout `JobRun`. message CreateChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The ID of the childRollout Phase initiated by this JobRun. @@ -2602,9 +2802,8 @@ message CreateChildRolloutJobRun { // AdvanceChildRolloutJobRun contains information specific to a // advanceChildRollout `JobRun`. message AdvanceChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. the ID of the ChildRollout's Phase. @@ -2659,7 +2858,7 @@ message ListJobRunsResponse { // GetJobRunRequest is the request object used by `GetJobRun`. message GetJobRunRequest { // Required. Name of the `JobRun`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2671,8 +2870,7 @@ message GetJobRunRequest { // The request object used by `TerminateJobRun`. message TerminateJobRunRequest { // Required. Name of the `JobRun`. Format must be - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2728,6 +2926,706 @@ message GetConfigRequest { ]; } +// An `Automation` resource in the Cloud Deploy API. +// +// An `Automation` enables the automation of manually driven actions for +// a Delivery Pipeline, which includes Release promotion amongst Targets, +// Rollout repair and Rollout deployment strategy advancement. The intention +// of Automation is to reduce manual intervention in the continuous delivery +// process. +message Automation { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Automation" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}" + style: DECLARATIVE_FRIENDLY + }; + + // Output only. Name of the `Automation`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Automation`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Automation`. Max length is 255 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the automation was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automation was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User annotations. These attributes can only be set and used by + // the user, and not by Cloud Deploy. Annotations must meet the following + // constraints: + // + // * Annotations are key/value pairs. + // * Valid annotation keys have two segments: an optional prefix and name, + // separated by a slash (`/`). + // * The name segment is required and must be 63 characters or less, + // beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with + // dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between. + // * The prefix is optional. If specified, the prefix must be a DNS subdomain: + // a series of DNS labels separated by dots(`.`), not longer than 253 + // characters in total, followed by a slash (`/`). + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set + // for more details. + map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 63 characters. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the `Automation` resource. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When Suspended, automation is deactivated from execution. + bool suspended = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Email address of the user-managed IAM service account that + // creates Cloud Deploy release and rollout resources. + string service_account = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Selected resources to which the automation will be applied. + AutomationResourceSelector selector = 11 + [(google.api.field_behavior) = REQUIRED]; + + // Required. List of Automation rules associated with the Automation resource. + // Must have at least one rule and limited to 250 rules per Delivery Pipeline. + // Note: the order of the rules here is not the same as the order of + // execution. + repeated AutomationRule rules = 14 [(google.api.field_behavior) = REQUIRED]; +} + +// AutomationResourceSelector contains the information to select the resources +// to which an Automation is going to be applied. +message AutomationResourceSelector { + // Contains attributes about a target. + repeated TargetAttribute targets = 1; +} + +// `AutomationRule` defines the automation activities. +message AutomationRule { + // The configuration of the Automation rule. + oneof rule { + // Optional. `PromoteReleaseRule` will automatically promote a release from + // the current target to a specified target. + PromoteReleaseRule promote_release_rule = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `AdvanceRolloutRule` will automatically advance a + // successful Rollout. + AdvanceRolloutRule advance_rollout_rule = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `RepairRolloutRule` will automatically repair a failed + // rollout. + RepairRolloutRule repair_rollout_rule = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// `PromoteRelease` rule will automatically promote a release from the current +// target to a specified target. +message PromoteReleaseRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long the release need to be paused until being promoted to + // the next target. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the stage in the pipeline to which this `Release` is + // deploying. If unspecified, default it to the next stage in the promotion + // flow. The value of this field could be one of the following: + // * The last segment of a target name. It only needs the ID to determine + // if the target is one of the stages in the promotion sequence defined + // in the pipeline. + // * "@next", the next target in the promotion sequence. + string destination_target_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The starting phase of the rollout created by this operation. + // Default to the first phase. + string destination_phase = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `AdvanceRollout` automation rule will automatically advance a successful +// Rollout to the next phase. +message AdvanceRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proceeds only after phase name matched any one in the list. + // This value must consist of lower-case letters, numbers, and hyphens, + // start with a letter and end with a letter or a number, and have a max + // length of 63 characters. In other words, it must match the following + // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How long to wait after a rollout is finished. + google.protobuf.Duration wait = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The `RepairRolloutRule` automation rule will automatically repair a failed +// `Rollout`. +message RepairRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Phases within which jobs are subject to automatic repair actions + // on failure. Proceeds only after phase name matched any one in the list, or + // for all phases if unspecified. This value must consist of lower-case + // letters, numbers, and hyphens, start with a letter and end with a letter or + // a number, and have a max length of 63 characters. In other words, it must + // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Jobs to repair. Proceeds only after job name matched any one in + // the list, or for all jobs if unspecified or empty. The phase that includes + // the job must match the phase ID specified in `source_phase`. This value + // must consist of lower-case letters, numbers, and hyphens, start with a + // letter and end with a letter or a number, and have a max length of 63 + // characters. In other words, it must match the following regex: + // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string jobs = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Defines the types of automatic repair actions for failed jobs. + repeated RepairMode repair_modes = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Information around the state of the 'Automation' rule. + AutomationRuleCondition condition = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration of the repair action. +message RepairMode { + // The repair action to perform. + oneof mode { + // Optional. Retries a failed job. + Retry retry = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rolls back a `Rollout`. + Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Retries the failed job. +message Retry { + // Required. Total number of retries. Retry will skipped if set to 0; The + // minimum value is 1, and the maximum value is 10. + int64 attempts = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long to wait for the first retry. Default is 0, and the + // maximum value is 14d. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The pattern of how wait time will be increased. Default is + // linear. Backoff mode will be ignored if `wait` is 0. + BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Rolls back a `Rollout`. +message Rollback { + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// `AutomationRuleCondition` contains conditions relevant to an +// `Automation` rule. +message AutomationRuleCondition { + // Optional. Details around targets enumerated in the rule. + TargetsPresentCondition targets_present_condition = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `CreateAutomation`. +message CreateAutomationRequest { + // Required. The parent collection in which the `Automation` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Required. ID of the `Automation`. + string automation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to create. + Automation automation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateAutomation`. +message UpdateAutomationRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Automation` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to update. + Automation automation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Automation` that does not exist will + // result in the creation of a new `Automation`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteAutomation`. +message DeleteAutomationRequest { + // Required. The name of the `Automation` to delete. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `Automation` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and verify whether the resource + // exists, but do not actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the request. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `ListAutomations`. +message ListAutomationsRequest { + // Required. The parent, which owns this collection of automations. Format + // must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // The maximum number of automations to return. The service may return + // fewer than this value. If unspecified, at most 50 automations will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter automations to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomations`. +message ListAutomationsResponse { + // The `Automations` objects. + repeated Automation automations = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetAutomation` +message GetAutomationRequest { + // Required. Name of the `Automation`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; +} + +// An `AutomationRun` resource in the Cloud Deploy API. +// +// An `AutomationRun` represents an automation execution instance of an +// automation rule. +message AutomationRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/AutomationRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}" + }; + + // Valid state of an `AutomationRun`. + enum State { + // The `AutomationRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `AutomationRun` has succeeded. + SUCCEEDED = 1; + + // The `AutomationRun` was cancelled. + CANCELLED = 2; + + // The `AutomationRun` has failed. + FAILED = 3; + + // The `AutomationRun` is in progress. + IN_PROGRESS = 4; + + // The `AutomationRun` is pending. + PENDING = 5; + } + + // Output only. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `AutomationRun` was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automationRun was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The weak etag of the `AutomationRun` resource. + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user-managed IAM service account that + // performs the operations against Cloud Deploy resources. + string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the Automation taken at AutomationRun creation + // time. + Automation automation_snapshot = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the target that represents the promotion stage that + // initiates the `AutomationRun`. The value of this field is the last segment + // of a target name. + string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `AutomationRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explains the current state of the `AutomationRun`. Present + // only an explanation is needed. + string state_description = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the `AutomationRun` will expire. An `AutomationRun` will + // expire after 14 days from its creation date. + google.protobuf.Timestamp expire_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation rule that initiated the operation. + string rule_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation that initiated the operation. + string automation_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The operation that the `AutomationRun` will perform. + oneof operation { + // Output only. Promotes a release to a specified 'Target'. + PromoteReleaseOperation promote_release_operation = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Advances a rollout to the next phase. + AdvanceRolloutOperation advance_rollout_operation = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Repairs a failed 'Rollout'. + RepairRolloutOperation repair_rollout_operation = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Earliest time the `AutomationRun` will attempt to resume. + // Wait-time is configured by `wait` in automation rule. + google.protobuf.Timestamp wait_until_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated promote-release operation. +message PromoteReleaseOperation { + // Output only. The ID of the target that represents the promotion stage to + // which the release will be promoted. The value of this field is the last + // segment of a target name. + string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The starting phase of the rollout created by this operation. + string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated advance-rollout operation. +message AdvanceRolloutOperation { + // Output only. The phase of a deployment that initiated the operation. + string source_phase = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase to which the rollout will be advanced to. + string destination_phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information for an automated `repair rollout` operation. +message RepairRolloutOperation { + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The index of the current repair action in the repair sequence. + int64 current_repair_mode_index = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Records of the repair attempts. Each repair phase may have + // multiple retry attempts or single rollback attempt. + repeated RepairPhase repair_phases = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RepairPhase tracks the repair attempts that have been made for +// each `RepairMode` specified in the `Automation` resource. +message RepairPhase { + oneof repair_phase { + // Output only. Records of the retry attempts for retry repair mode. + RetryPhase retry = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Rollback attempt for rollback repair mode . + RollbackAttempt rollback = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// RetryPhase contains the retry attempts and the metadata for initiating a +// new attempt. +message RetryPhase { + // Output only. The number of attempts that have been made. + int64 total_attempts = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pattern of how the wait time of the retry attempt is + // calculated. + BackoffMode backoff_mode = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase ID of the phase that includes the job being retried. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The job ID for the Job to retry. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detail of a retry action. + repeated RetryAttempt attempts = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RetryAttempt represents an action of retrying the failed Cloud Deploy job. +message RetryAttempt { + // Output only. The index of this retry attempt. + int64 attempt = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this retry action. + RepairState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Retry. + string state_desc = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'. +message RollbackAttempt { + // Output only. The phase to which the rollout will be rolled back to. + string destination_phase = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the rollback `Rollout` to create. + string rollout_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this rollback action. + RepairState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Rollback. + string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListAutomationRuns`. +message ListAutomationRunsRequest { + // Required. The parent, which owns this collection of automationRuns. Format + // must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; + + // The maximum number of automationRuns to return. The service may return + // fewer than this value. If unspecified, at most 50 automationRuns will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomationRuns` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other provided parameters match + // the call that provided the page token. + string page_token = 3; + + // Filter automationRuns to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomationRuns`. +message ListAutomationRunsResponse { + // The `AutomationRuns` objects. + repeated AutomationRun automation_runs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request object for `GetAutomationRun` +message GetAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The request object used by `CancelAutomationRun`. +message CancelAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The response object from `CancelAutomationRun`. +message CancelAutomationRunResponse {} + // The support state of a specific Skaffold version. enum SkaffoldSupportState { // Default value. This value is unused. @@ -2742,3 +3640,39 @@ enum SkaffoldSupportState { // This skaffold version is no longer supported. SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3; } + +// The pattern of how wait time is increased. +enum BackoffMode { + // No WaitMode is specified. + BACKOFF_MODE_UNSPECIFIED = 0; + + // Increases the wait time linearly. + BACKOFF_MODE_LINEAR = 1; + + // Increases the wait time exponentially. + BACKOFF_MODE_EXPONENTIAL = 2; +} + +// Valid state of a repair attempt. +enum RepairState { + // The `repair` has an unspecified state. + REPAIR_STATE_UNSPECIFIED = 0; + + // The `repair` action has succeeded. + REPAIR_STATE_SUCCEEDED = 1; + + // The `repair` action was cancelled. + REPAIR_STATE_CANCELLED = 2; + + // The `repair` action has failed. + REPAIR_STATE_FAILED = 3; + + // The `repair` action is in progress. + REPAIR_STATE_IN_PROGRESS = 4; + + // The `repair` action is pending. + REPAIR_STATE_PENDING = 5; + + // The `repair` action was skipped. + REPAIR_STATE_SKIPPED = 6; +} diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto index b679895254b..0329689960a 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/release_render_payload.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.deploy.v1; +import "google/cloud/deploy/v1/cloud_deploy.proto"; + option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; option java_multiple_files = true; option java_outer_classname = "ReleaseRenderPayloadProto"; @@ -28,6 +30,9 @@ message ReleaseRenderEvent { // details as rendering progresses through render states. string message = 1; - // The name of the `Release`. + // The name of the release. string release = 2; + + // The state of the release render. + Release.RenderState release_render_state = 3; } diff --git a/owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_update_payload.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/rollout_update_payload.proto similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/protos/google/cloud/deploy/v1/rollout_update_payload.proto rename to packages/google-cloud-deploy/protos/google/cloud/deploy/v1/rollout_update_payload.proto diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 0d416708d1c..690a319d34e 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -26,6 +26,266 @@ export namespace google { /** Namespace v1. */ namespace v1 { + /** Properties of an AutomationEvent. */ + interface IAutomationEvent { + + /** AutomationEvent message */ + message?: (string|null); + + /** AutomationEvent automation */ + automation?: (string|null); + + /** AutomationEvent pipelineUid */ + pipelineUid?: (string|null); + + /** AutomationEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents an AutomationEvent. */ + class AutomationEvent implements IAutomationEvent { + + /** + * Constructs a new AutomationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationEvent); + + /** AutomationEvent message. */ + public message: string; + + /** AutomationEvent automation. */ + public automation: string; + + /** AutomationEvent pipelineUid. */ + public pipelineUid: string; + + /** AutomationEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new AutomationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationEvent): google.cloud.deploy.v1.AutomationEvent; + + /** + * Encodes the specified AutomationEvent message. Does not implicitly {@link google.cloud.deploy.v1.AutomationEvent.verify|verify} messages. + * @param message AutomationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationEvent.verify|verify} messages. + * @param message AutomationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationEvent; + + /** + * Decodes an AutomationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationEvent; + + /** + * Verifies an AutomationEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationEvent; + + /** + * Creates a plain object from an AutomationEvent message. Also converts values to other types if specified. + * @param message AutomationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TYPE_PUBSUB_NOTIFICATION_FAILURE = 1, + TYPE_RESOURCE_STATE_CHANGE = 3, + TYPE_PROCESS_ABORTED = 4, + TYPE_RESTRICTION_VIOLATED = 5, + TYPE_RESOURCE_DELETED = 6, + TYPE_ROLLOUT_UPDATE = 7, + TYPE_RENDER_STATUES_CHANGE = 2 + } + + /** Properties of an AutomationRunEvent. */ + interface IAutomationRunEvent { + + /** AutomationRunEvent message */ + message?: (string|null); + + /** AutomationRunEvent automationRun */ + automationRun?: (string|null); + + /** AutomationRunEvent pipelineUid */ + pipelineUid?: (string|null); + + /** AutomationRunEvent automationId */ + automationId?: (string|null); + + /** AutomationRunEvent ruleId */ + ruleId?: (string|null); + + /** AutomationRunEvent destinationTargetId */ + destinationTargetId?: (string|null); + + /** AutomationRunEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents an AutomationRunEvent. */ + class AutomationRunEvent implements IAutomationRunEvent { + + /** + * Constructs a new AutomationRunEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationRunEvent); + + /** AutomationRunEvent message. */ + public message: string; + + /** AutomationRunEvent automationRun. */ + public automationRun: string; + + /** AutomationRunEvent pipelineUid. */ + public pipelineUid: string; + + /** AutomationRunEvent automationId. */ + public automationId: string; + + /** AutomationRunEvent ruleId. */ + public ruleId: string; + + /** AutomationRunEvent destinationTargetId. */ + public destinationTargetId: string; + + /** AutomationRunEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new AutomationRunEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationRunEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationRunEvent): google.cloud.deploy.v1.AutomationRunEvent; + + /** + * Encodes the specified AutomationRunEvent message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRunEvent.verify|verify} messages. + * @param message AutomationRunEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationRunEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationRunEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRunEvent.verify|verify} messages. + * @param message AutomationRunEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationRunEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationRunEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationRunEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationRunEvent; + + /** + * Decodes an AutomationRunEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationRunEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationRunEvent; + + /** + * Verifies an AutomationRunEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationRunEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationRunEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationRunEvent; + + /** + * Creates a plain object from an AutomationRunEvent message. Also converts values to other types if specified. + * @param message AutomationRunEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationRunEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationRunEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationRunEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents a CloudDeploy */ class CloudDeploy extends $protobuf.rpc.Service { @@ -130,6 +390,20 @@ export namespace google { */ public listTargets(request: google.cloud.deploy.v1.IListTargetsRequest): Promise; + /** + * Calls RollbackTarget. + * @param request RollbackTargetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RollbackTargetResponse + */ + public rollbackTarget(request: google.cloud.deploy.v1.IRollbackTargetRequest, callback: google.cloud.deploy.v1.CloudDeploy.RollbackTargetCallback): void; + + /** + * Calls RollbackTarget. + * @param request RollbackTargetRequest message or plain object + * @returns Promise + */ + public rollbackTarget(request: google.cloud.deploy.v1.IRollbackTargetRequest): Promise; + /** * Calls GetTarget. * @param request GetTargetRequest message or plain object @@ -409,6 +683,118 @@ export namespace google { * @returns Promise */ public getConfig(request: google.cloud.deploy.v1.IGetConfigRequest): Promise; + + /** + * Calls CreateAutomation. + * @param request CreateAutomationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAutomation(request: google.cloud.deploy.v1.ICreateAutomationRequest, callback: google.cloud.deploy.v1.CloudDeploy.CreateAutomationCallback): void; + + /** + * Calls CreateAutomation. + * @param request CreateAutomationRequest message or plain object + * @returns Promise + */ + public createAutomation(request: google.cloud.deploy.v1.ICreateAutomationRequest): Promise; + + /** + * Calls UpdateAutomation. + * @param request UpdateAutomationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAutomation(request: google.cloud.deploy.v1.IUpdateAutomationRequest, callback: google.cloud.deploy.v1.CloudDeploy.UpdateAutomationCallback): void; + + /** + * Calls UpdateAutomation. + * @param request UpdateAutomationRequest message or plain object + * @returns Promise + */ + public updateAutomation(request: google.cloud.deploy.v1.IUpdateAutomationRequest): Promise; + + /** + * Calls DeleteAutomation. + * @param request DeleteAutomationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAutomation(request: google.cloud.deploy.v1.IDeleteAutomationRequest, callback: google.cloud.deploy.v1.CloudDeploy.DeleteAutomationCallback): void; + + /** + * Calls DeleteAutomation. + * @param request DeleteAutomationRequest message or plain object + * @returns Promise + */ + public deleteAutomation(request: google.cloud.deploy.v1.IDeleteAutomationRequest): Promise; + + /** + * Calls GetAutomation. + * @param request GetAutomationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Automation + */ + public getAutomation(request: google.cloud.deploy.v1.IGetAutomationRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetAutomationCallback): void; + + /** + * Calls GetAutomation. + * @param request GetAutomationRequest message or plain object + * @returns Promise + */ + public getAutomation(request: google.cloud.deploy.v1.IGetAutomationRequest): Promise; + + /** + * Calls ListAutomations. + * @param request ListAutomationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAutomationsResponse + */ + public listAutomations(request: google.cloud.deploy.v1.IListAutomationsRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListAutomationsCallback): void; + + /** + * Calls ListAutomations. + * @param request ListAutomationsRequest message or plain object + * @returns Promise + */ + public listAutomations(request: google.cloud.deploy.v1.IListAutomationsRequest): Promise; + + /** + * Calls GetAutomationRun. + * @param request GetAutomationRunRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutomationRun + */ + public getAutomationRun(request: google.cloud.deploy.v1.IGetAutomationRunRequest, callback: google.cloud.deploy.v1.CloudDeploy.GetAutomationRunCallback): void; + + /** + * Calls GetAutomationRun. + * @param request GetAutomationRunRequest message or plain object + * @returns Promise + */ + public getAutomationRun(request: google.cloud.deploy.v1.IGetAutomationRunRequest): Promise; + + /** + * Calls ListAutomationRuns. + * @param request ListAutomationRunsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAutomationRunsResponse + */ + public listAutomationRuns(request: google.cloud.deploy.v1.IListAutomationRunsRequest, callback: google.cloud.deploy.v1.CloudDeploy.ListAutomationRunsCallback): void; + + /** + * Calls ListAutomationRuns. + * @param request ListAutomationRunsRequest message or plain object + * @returns Promise + */ + public listAutomationRuns(request: google.cloud.deploy.v1.IListAutomationRunsRequest): Promise; + + /** + * Calls CancelAutomationRun. + * @param request CancelAutomationRunRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CancelAutomationRunResponse + */ + public cancelAutomationRun(request: google.cloud.deploy.v1.ICancelAutomationRunRequest, callback: google.cloud.deploy.v1.CloudDeploy.CancelAutomationRunCallback): void; + + /** + * Calls CancelAutomationRun. + * @param request CancelAutomationRunRequest message or plain object + * @returns Promise + */ + public cancelAutomationRun(request: google.cloud.deploy.v1.ICancelAutomationRunRequest): Promise; } namespace CloudDeploy { @@ -455,6 +841,13 @@ export namespace google { */ type ListTargetsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListTargetsResponse) => void; + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|rollbackTarget}. + * @param error Error, if any + * @param [response] RollbackTargetResponse + */ + type RollbackTargetCallback = (error: (Error|null), response?: google.cloud.deploy.v1.RollbackTargetResponse) => void; + /** * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getTarget}. * @param error Error, if any @@ -594,19 +987,75 @@ export namespace google { * @param [response] Config */ type GetConfigCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Config) => void; - } - - /** Properties of a DeliveryPipeline. */ - interface IDeliveryPipeline { - /** DeliveryPipeline name */ - name?: (string|null); + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createAutomation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAutomationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** DeliveryPipeline uid */ - uid?: (string|null); + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateAutomation}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAutomationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** DeliveryPipeline description */ - description?: (string|null); + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteAutomation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAutomationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getAutomation}. + * @param error Error, if any + * @param [response] Automation + */ + type GetAutomationCallback = (error: (Error|null), response?: google.cloud.deploy.v1.Automation) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listAutomations}. + * @param error Error, if any + * @param [response] ListAutomationsResponse + */ + type ListAutomationsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListAutomationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getAutomationRun}. + * @param error Error, if any + * @param [response] AutomationRun + */ + type GetAutomationRunCallback = (error: (Error|null), response?: google.cloud.deploy.v1.AutomationRun) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listAutomationRuns}. + * @param error Error, if any + * @param [response] ListAutomationRunsResponse + */ + type ListAutomationRunsCallback = (error: (Error|null), response?: google.cloud.deploy.v1.ListAutomationRunsResponse) => void; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|cancelAutomationRun}. + * @param error Error, if any + * @param [response] CancelAutomationRunResponse + */ + type CancelAutomationRunCallback = (error: (Error|null), response?: google.cloud.deploy.v1.CancelAutomationRunResponse) => void; + } + + /** Properties of a DeliveryPipeline. */ + interface IDeliveryPipeline { + + /** DeliveryPipeline name */ + name?: (string|null); + + /** DeliveryPipeline uid */ + uid?: (string|null); + + /** DeliveryPipeline description */ + description?: (string|null); /** DeliveryPipeline annotations */ annotations?: ({ [k: string]: string }|null); @@ -3590,6 +4039,339 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a RollbackTargetConfig. */ + interface IRollbackTargetConfig { + + /** RollbackTargetConfig rollout */ + rollout?: (google.cloud.deploy.v1.IRollout|null); + + /** RollbackTargetConfig startingPhaseId */ + startingPhaseId?: (string|null); + } + + /** Represents a RollbackTargetConfig. */ + class RollbackTargetConfig implements IRollbackTargetConfig { + + /** + * Constructs a new RollbackTargetConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollbackTargetConfig); + + /** RollbackTargetConfig rollout. */ + public rollout?: (google.cloud.deploy.v1.IRollout|null); + + /** RollbackTargetConfig startingPhaseId. */ + public startingPhaseId: string; + + /** + * Creates a new RollbackTargetConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackTargetConfig instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollbackTargetConfig): google.cloud.deploy.v1.RollbackTargetConfig; + + /** + * Encodes the specified RollbackTargetConfig message. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetConfig.verify|verify} messages. + * @param message RollbackTargetConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollbackTargetConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackTargetConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetConfig.verify|verify} messages. + * @param message RollbackTargetConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollbackTargetConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackTargetConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackTargetConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RollbackTargetConfig; + + /** + * Decodes a RollbackTargetConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackTargetConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RollbackTargetConfig; + + /** + * Verifies a RollbackTargetConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackTargetConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackTargetConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RollbackTargetConfig; + + /** + * Creates a plain object from a RollbackTargetConfig message. Also converts values to other types if specified. + * @param message RollbackTargetConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RollbackTargetConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackTargetConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackTargetConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RollbackTargetRequest. */ + interface IRollbackTargetRequest { + + /** RollbackTargetRequest name */ + name?: (string|null); + + /** RollbackTargetRequest targetId */ + targetId?: (string|null); + + /** RollbackTargetRequest rolloutId */ + rolloutId?: (string|null); + + /** RollbackTargetRequest releaseId */ + releaseId?: (string|null); + + /** RollbackTargetRequest rolloutToRollBack */ + rolloutToRollBack?: (string|null); + + /** RollbackTargetRequest rollbackConfig */ + rollbackConfig?: (google.cloud.deploy.v1.IRollbackTargetConfig|null); + + /** RollbackTargetRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a RollbackTargetRequest. */ + class RollbackTargetRequest implements IRollbackTargetRequest { + + /** + * Constructs a new RollbackTargetRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollbackTargetRequest); + + /** RollbackTargetRequest name. */ + public name: string; + + /** RollbackTargetRequest targetId. */ + public targetId: string; + + /** RollbackTargetRequest rolloutId. */ + public rolloutId: string; + + /** RollbackTargetRequest releaseId. */ + public releaseId: string; + + /** RollbackTargetRequest rolloutToRollBack. */ + public rolloutToRollBack: string; + + /** RollbackTargetRequest rollbackConfig. */ + public rollbackConfig?: (google.cloud.deploy.v1.IRollbackTargetConfig|null); + + /** RollbackTargetRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new RollbackTargetRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackTargetRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollbackTargetRequest): google.cloud.deploy.v1.RollbackTargetRequest; + + /** + * Encodes the specified RollbackTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetRequest.verify|verify} messages. + * @param message RollbackTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollbackTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetRequest.verify|verify} messages. + * @param message RollbackTargetRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollbackTargetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackTargetRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RollbackTargetRequest; + + /** + * Decodes a RollbackTargetRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RollbackTargetRequest; + + /** + * Verifies a RollbackTargetRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackTargetRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackTargetRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RollbackTargetRequest; + + /** + * Creates a plain object from a RollbackTargetRequest message. Also converts values to other types if specified. + * @param message RollbackTargetRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RollbackTargetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackTargetRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackTargetRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RollbackTargetResponse. */ + interface IRollbackTargetResponse { + + /** RollbackTargetResponse rollbackConfig */ + rollbackConfig?: (google.cloud.deploy.v1.IRollbackTargetConfig|null); + } + + /** Represents a RollbackTargetResponse. */ + class RollbackTargetResponse implements IRollbackTargetResponse { + + /** + * Constructs a new RollbackTargetResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollbackTargetResponse); + + /** RollbackTargetResponse rollbackConfig. */ + public rollbackConfig?: (google.cloud.deploy.v1.IRollbackTargetConfig|null); + + /** + * Creates a new RollbackTargetResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackTargetResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollbackTargetResponse): google.cloud.deploy.v1.RollbackTargetResponse; + + /** + * Encodes the specified RollbackTargetResponse message. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetResponse.verify|verify} messages. + * @param message RollbackTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollbackTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackTargetResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetResponse.verify|verify} messages. + * @param message RollbackTargetResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollbackTargetResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackTargetResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RollbackTargetResponse; + + /** + * Decodes a RollbackTargetResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackTargetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RollbackTargetResponse; + + /** + * Verifies a RollbackTargetResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackTargetResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackTargetResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RollbackTargetResponse; + + /** + * Creates a plain object from a RollbackTargetResponse message. Also converts values to other types if specified. + * @param message RollbackTargetResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RollbackTargetResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackTargetResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackTargetResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Target. */ interface ITarget { @@ -5225,8 +6007,111 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Release. */ - interface IRelease { + /** Properties of a TargetAttribute. */ + interface ITargetAttribute { + + /** TargetAttribute id */ + id?: (string|null); + + /** TargetAttribute labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a TargetAttribute. */ + class TargetAttribute implements ITargetAttribute { + + /** + * Constructs a new TargetAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ITargetAttribute); + + /** TargetAttribute id. */ + public id: string; + + /** TargetAttribute labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new TargetAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetAttribute instance + */ + public static create(properties?: google.cloud.deploy.v1.ITargetAttribute): google.cloud.deploy.v1.TargetAttribute; + + /** + * Encodes the specified TargetAttribute message. Does not implicitly {@link google.cloud.deploy.v1.TargetAttribute.verify|verify} messages. + * @param message TargetAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ITargetAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetAttribute message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetAttribute.verify|verify} messages. + * @param message TargetAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ITargetAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.TargetAttribute; + + /** + * Decodes a TargetAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.TargetAttribute; + + /** + * Verifies a TargetAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetAttribute + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.TargetAttribute; + + /** + * Creates a plain object from a TargetAttribute message. Also converts values to other types if specified. + * @param message TargetAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.TargetAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Release. */ + interface IRelease { /** Release name */ name?: (string|null); @@ -5589,6 +6474,7 @@ export namespace google { CLOUD_BUILD_UNAVAILABLE = 1, EXECUTION_FAILED = 2, CLOUD_BUILD_REQUEST_FAILED = 3, + VERIFICATION_CONFIG_NOT_FOUND = 4, CUSTOM_ACTION_NOT_FOUND = 5 } } @@ -7049,6 +7935,12 @@ export namespace google { /** Rollout controllerRollout */ controllerRollout?: (string|null); + + /** Rollout rollbackOfRollout */ + rollbackOfRollout?: (string|null); + + /** Rollout rolledBackByRollouts */ + rolledBackByRollouts?: (string[]|null); } /** Represents a Rollout. */ @@ -7120,6 +8012,12 @@ export namespace google { /** Rollout controllerRollout. */ public controllerRollout: string; + /** Rollout rollbackOfRollout. */ + public rollbackOfRollout: string; + + /** Rollout rolledBackByRollouts. */ + public rolledBackByRollouts: string[]; + /** * Creates a new Rollout instance using the specified properties. * @param [properties] Properties to set @@ -7242,6 +8140,9 @@ export namespace google { /** Metadata cloudRun */ cloudRun?: (google.cloud.deploy.v1.ICloudRunMetadata|null); + + /** Metadata automation */ + automation?: (google.cloud.deploy.v1.IAutomationRolloutMetadata|null); } /** Represents a Metadata. */ @@ -7256,6 +8157,9 @@ export namespace google { /** Metadata cloudRun. */ public cloudRun?: (google.cloud.deploy.v1.ICloudRunMetadata|null); + /** Metadata automation. */ + public automation?: (google.cloud.deploy.v1.IAutomationRolloutMetadata|null); + /** * Creates a new Metadata instance using the specified properties. * @param [properties] Properties to set @@ -7442,6 +8346,9 @@ export namespace google { /** CloudRunMetadata revision */ revision?: (string|null); + + /** CloudRunMetadata job */ + job?: (string|null); } /** Represents a CloudRunMetadata. */ @@ -7462,6 +8369,9 @@ export namespace google { /** CloudRunMetadata revision. */ public revision: string; + /** CloudRunMetadata job. */ + public job: string; + /** * Creates a new CloudRunMetadata instance using the specified properties. * @param [properties] Properties to set @@ -7540,6 +8450,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AutomationRolloutMetadata. */ + interface IAutomationRolloutMetadata { + + /** AutomationRolloutMetadata promoteAutomationRun */ + promoteAutomationRun?: (string|null); + + /** AutomationRolloutMetadata advanceAutomationRuns */ + advanceAutomationRuns?: (string[]|null); + + /** AutomationRolloutMetadata repairAutomationRuns */ + repairAutomationRuns?: (string[]|null); + } + + /** Represents an AutomationRolloutMetadata. */ + class AutomationRolloutMetadata implements IAutomationRolloutMetadata { + + /** + * Constructs a new AutomationRolloutMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationRolloutMetadata); + + /** AutomationRolloutMetadata promoteAutomationRun. */ + public promoteAutomationRun: string; + + /** AutomationRolloutMetadata advanceAutomationRuns. */ + public advanceAutomationRuns: string[]; + + /** AutomationRolloutMetadata repairAutomationRuns. */ + public repairAutomationRuns: string[]; + + /** + * Creates a new AutomationRolloutMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationRolloutMetadata instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationRolloutMetadata): google.cloud.deploy.v1.AutomationRolloutMetadata; + + /** + * Encodes the specified AutomationRolloutMetadata message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRolloutMetadata.verify|verify} messages. + * @param message AutomationRolloutMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationRolloutMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationRolloutMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRolloutMetadata.verify|verify} messages. + * @param message AutomationRolloutMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationRolloutMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationRolloutMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationRolloutMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationRolloutMetadata; + + /** + * Decodes an AutomationRolloutMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationRolloutMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationRolloutMetadata; + + /** + * Verifies an AutomationRolloutMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationRolloutMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationRolloutMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationRolloutMetadata; + + /** + * Creates a plain object from an AutomationRolloutMetadata message. Also converts values to other types if specified. + * @param message AutomationRolloutMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationRolloutMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationRolloutMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationRolloutMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Phase. */ interface IPhase { @@ -11761,363 +12780,3705 @@ export namespace google { /** * Decodes a TerminateJobRunResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TerminateJobRunResponse + * @returns TerminateJobRunResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.TerminateJobRunResponse; + + /** + * Verifies a TerminateJobRunResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TerminateJobRunResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TerminateJobRunResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.TerminateJobRunResponse; + + /** + * Creates a plain object from a TerminateJobRunResponse message. Also converts values to other types if specified. + * @param message TerminateJobRunResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.TerminateJobRunResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TerminateJobRunResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TerminateJobRunResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Config. */ + interface IConfig { + + /** Config name */ + name?: (string|null); + + /** Config supportedVersions */ + supportedVersions?: (google.cloud.deploy.v1.ISkaffoldVersion[]|null); + + /** Config defaultSkaffoldVersion */ + defaultSkaffoldVersion?: (string|null); + } + + /** Represents a Config. */ + class Config implements IConfig { + + /** + * Constructs a new Config. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IConfig); + + /** Config name. */ + public name: string; + + /** Config supportedVersions. */ + public supportedVersions: google.cloud.deploy.v1.ISkaffoldVersion[]; + + /** Config defaultSkaffoldVersion. */ + public defaultSkaffoldVersion: string; + + /** + * Creates a new Config instance using the specified properties. + * @param [properties] Properties to set + * @returns Config instance + */ + public static create(properties?: google.cloud.deploy.v1.IConfig): google.cloud.deploy.v1.Config; + + /** + * Encodes the specified Config message. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * @param message Config message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * @param message Config message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Config message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Config; + + /** + * Decodes a Config message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Config; + + /** + * Verifies a Config message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Config message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Config + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Config; + + /** + * Creates a plain object from a Config message. Also converts values to other types if specified. + * @param message Config + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Config, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Config to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Config + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SkaffoldVersion. */ + interface ISkaffoldVersion { + + /** SkaffoldVersion version */ + version?: (string|null); + + /** SkaffoldVersion maintenanceModeTime */ + maintenanceModeTime?: (google.protobuf.ITimestamp|null); + + /** SkaffoldVersion supportExpirationTime */ + supportExpirationTime?: (google.protobuf.ITimestamp|null); + + /** SkaffoldVersion supportEndDate */ + supportEndDate?: (google.type.IDate|null); + } + + /** Represents a SkaffoldVersion. */ + class SkaffoldVersion implements ISkaffoldVersion { + + /** + * Constructs a new SkaffoldVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ISkaffoldVersion); + + /** SkaffoldVersion version. */ + public version: string; + + /** SkaffoldVersion maintenanceModeTime. */ + public maintenanceModeTime?: (google.protobuf.ITimestamp|null); + + /** SkaffoldVersion supportExpirationTime. */ + public supportExpirationTime?: (google.protobuf.ITimestamp|null); + + /** SkaffoldVersion supportEndDate. */ + public supportEndDate?: (google.type.IDate|null); + + /** + * Creates a new SkaffoldVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns SkaffoldVersion instance + */ + public static create(properties?: google.cloud.deploy.v1.ISkaffoldVersion): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Encodes the specified SkaffoldVersion message. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * @param message SkaffoldVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ISkaffoldVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SkaffoldVersion message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * @param message SkaffoldVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ISkaffoldVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SkaffoldVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SkaffoldVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Decodes a SkaffoldVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SkaffoldVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Verifies a SkaffoldVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SkaffoldVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SkaffoldVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.SkaffoldVersion; + + /** + * Creates a plain object from a SkaffoldVersion message. Also converts values to other types if specified. + * @param message SkaffoldVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.SkaffoldVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SkaffoldVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SkaffoldVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConfigRequest. */ + interface IGetConfigRequest { + + /** GetConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetConfigRequest. */ + class GetConfigRequest implements IGetConfigRequest { + + /** + * Constructs a new GetConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetConfigRequest); + + /** GetConfigRequest name. */ + public name: string; + + /** + * Creates a new GetConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConfigRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetConfigRequest): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Encodes the specified GetConfigRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * @param message GetConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * @param message GetConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Decodes a GetConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Verifies a GetConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetConfigRequest; + + /** + * Creates a plain object from a GetConfigRequest message. Also converts values to other types if specified. + * @param message GetConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Automation. */ + interface IAutomation { + + /** Automation name */ + name?: (string|null); + + /** Automation uid */ + uid?: (string|null); + + /** Automation description */ + description?: (string|null); + + /** Automation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Automation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Automation annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Automation labels */ + labels?: ({ [k: string]: string }|null); + + /** Automation etag */ + etag?: (string|null); + + /** Automation suspended */ + suspended?: (boolean|null); + + /** Automation serviceAccount */ + serviceAccount?: (string|null); + + /** Automation selector */ + selector?: (google.cloud.deploy.v1.IAutomationResourceSelector|null); + + /** Automation rules */ + rules?: (google.cloud.deploy.v1.IAutomationRule[]|null); + } + + /** Represents an Automation. */ + class Automation implements IAutomation { + + /** + * Constructs a new Automation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomation); + + /** Automation name. */ + public name: string; + + /** Automation uid. */ + public uid: string; + + /** Automation description. */ + public description: string; + + /** Automation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Automation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Automation annotations. */ + public annotations: { [k: string]: string }; + + /** Automation labels. */ + public labels: { [k: string]: string }; + + /** Automation etag. */ + public etag: string; + + /** Automation suspended. */ + public suspended: boolean; + + /** Automation serviceAccount. */ + public serviceAccount: string; + + /** Automation selector. */ + public selector?: (google.cloud.deploy.v1.IAutomationResourceSelector|null); + + /** Automation rules. */ + public rules: google.cloud.deploy.v1.IAutomationRule[]; + + /** + * Creates a new Automation instance using the specified properties. + * @param [properties] Properties to set + * @returns Automation instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomation): google.cloud.deploy.v1.Automation; + + /** + * Encodes the specified Automation message. Does not implicitly {@link google.cloud.deploy.v1.Automation.verify|verify} messages. + * @param message Automation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Automation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Automation.verify|verify} messages. + * @param message Automation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Automation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Automation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Automation; + + /** + * Decodes an Automation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Automation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Automation; + + /** + * Verifies an Automation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Automation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Automation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Automation; + + /** + * Creates a plain object from an Automation message. Also converts values to other types if specified. + * @param message Automation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Automation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Automation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Automation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutomationResourceSelector. */ + interface IAutomationResourceSelector { + + /** AutomationResourceSelector targets */ + targets?: (google.cloud.deploy.v1.ITargetAttribute[]|null); + } + + /** Represents an AutomationResourceSelector. */ + class AutomationResourceSelector implements IAutomationResourceSelector { + + /** + * Constructs a new AutomationResourceSelector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationResourceSelector); + + /** AutomationResourceSelector targets. */ + public targets: google.cloud.deploy.v1.ITargetAttribute[]; + + /** + * Creates a new AutomationResourceSelector instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationResourceSelector instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationResourceSelector): google.cloud.deploy.v1.AutomationResourceSelector; + + /** + * Encodes the specified AutomationResourceSelector message. Does not implicitly {@link google.cloud.deploy.v1.AutomationResourceSelector.verify|verify} messages. + * @param message AutomationResourceSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationResourceSelector message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationResourceSelector.verify|verify} messages. + * @param message AutomationResourceSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationResourceSelector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationResourceSelector; + + /** + * Decodes an AutomationResourceSelector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationResourceSelector; + + /** + * Verifies an AutomationResourceSelector message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationResourceSelector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationResourceSelector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationResourceSelector; + + /** + * Creates a plain object from an AutomationResourceSelector message. Also converts values to other types if specified. + * @param message AutomationResourceSelector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationResourceSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationResourceSelector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationResourceSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutomationRule. */ + interface IAutomationRule { + + /** AutomationRule promoteReleaseRule */ + promoteReleaseRule?: (google.cloud.deploy.v1.IPromoteReleaseRule|null); + + /** AutomationRule advanceRolloutRule */ + advanceRolloutRule?: (google.cloud.deploy.v1.IAdvanceRolloutRule|null); + + /** AutomationRule repairRolloutRule */ + repairRolloutRule?: (google.cloud.deploy.v1.IRepairRolloutRule|null); + } + + /** Represents an AutomationRule. */ + class AutomationRule implements IAutomationRule { + + /** + * Constructs a new AutomationRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationRule); + + /** AutomationRule promoteReleaseRule. */ + public promoteReleaseRule?: (google.cloud.deploy.v1.IPromoteReleaseRule|null); + + /** AutomationRule advanceRolloutRule. */ + public advanceRolloutRule?: (google.cloud.deploy.v1.IAdvanceRolloutRule|null); + + /** AutomationRule repairRolloutRule. */ + public repairRolloutRule?: (google.cloud.deploy.v1.IRepairRolloutRule|null); + + /** AutomationRule rule. */ + public rule?: ("promoteReleaseRule"|"advanceRolloutRule"|"repairRolloutRule"); + + /** + * Creates a new AutomationRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationRule instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationRule): google.cloud.deploy.v1.AutomationRule; + + /** + * Encodes the specified AutomationRule message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRule.verify|verify} messages. + * @param message AutomationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRule.verify|verify} messages. + * @param message AutomationRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationRule; + + /** + * Decodes an AutomationRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationRule; + + /** + * Verifies an AutomationRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationRule; + + /** + * Creates a plain object from an AutomationRule message. Also converts values to other types if specified. + * @param message AutomationRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PromoteReleaseRule. */ + interface IPromoteReleaseRule { + + /** PromoteReleaseRule id */ + id?: (string|null); + + /** PromoteReleaseRule wait */ + wait?: (google.protobuf.IDuration|null); + + /** PromoteReleaseRule destinationTargetId */ + destinationTargetId?: (string|null); + + /** PromoteReleaseRule condition */ + condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + + /** PromoteReleaseRule destinationPhase */ + destinationPhase?: (string|null); + } + + /** Represents a PromoteReleaseRule. */ + class PromoteReleaseRule implements IPromoteReleaseRule { + + /** + * Constructs a new PromoteReleaseRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IPromoteReleaseRule); + + /** PromoteReleaseRule id. */ + public id: string; + + /** PromoteReleaseRule wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** PromoteReleaseRule destinationTargetId. */ + public destinationTargetId: string; + + /** PromoteReleaseRule condition. */ + public condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + + /** PromoteReleaseRule destinationPhase. */ + public destinationPhase: string; + + /** + * Creates a new PromoteReleaseRule instance using the specified properties. + * @param [properties] Properties to set + * @returns PromoteReleaseRule instance + */ + public static create(properties?: google.cloud.deploy.v1.IPromoteReleaseRule): google.cloud.deploy.v1.PromoteReleaseRule; + + /** + * Encodes the specified PromoteReleaseRule message. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseRule.verify|verify} messages. + * @param message PromoteReleaseRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IPromoteReleaseRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PromoteReleaseRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseRule.verify|verify} messages. + * @param message PromoteReleaseRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IPromoteReleaseRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PromoteReleaseRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PromoteReleaseRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.PromoteReleaseRule; + + /** + * Decodes a PromoteReleaseRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PromoteReleaseRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.PromoteReleaseRule; + + /** + * Verifies a PromoteReleaseRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PromoteReleaseRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PromoteReleaseRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.PromoteReleaseRule; + + /** + * Creates a plain object from a PromoteReleaseRule message. Also converts values to other types if specified. + * @param message PromoteReleaseRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.PromoteReleaseRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PromoteReleaseRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PromoteReleaseRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvanceRolloutRule. */ + interface IAdvanceRolloutRule { + + /** AdvanceRolloutRule id */ + id?: (string|null); + + /** AdvanceRolloutRule sourcePhases */ + sourcePhases?: (string[]|null); + + /** AdvanceRolloutRule wait */ + wait?: (google.protobuf.IDuration|null); + + /** AdvanceRolloutRule condition */ + condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + } + + /** Represents an AdvanceRolloutRule. */ + class AdvanceRolloutRule implements IAdvanceRolloutRule { + + /** + * Constructs a new AdvanceRolloutRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAdvanceRolloutRule); + + /** AdvanceRolloutRule id. */ + public id: string; + + /** AdvanceRolloutRule sourcePhases. */ + public sourcePhases: string[]; + + /** AdvanceRolloutRule wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** AdvanceRolloutRule condition. */ + public condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + + /** + * Creates a new AdvanceRolloutRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvanceRolloutRule instance + */ + public static create(properties?: google.cloud.deploy.v1.IAdvanceRolloutRule): google.cloud.deploy.v1.AdvanceRolloutRule; + + /** + * Encodes the specified AdvanceRolloutRule message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRule.verify|verify} messages. + * @param message AdvanceRolloutRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAdvanceRolloutRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvanceRolloutRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRule.verify|verify} messages. + * @param message AdvanceRolloutRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAdvanceRolloutRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvanceRolloutRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvanceRolloutRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AdvanceRolloutRule; + + /** + * Decodes an AdvanceRolloutRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvanceRolloutRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AdvanceRolloutRule; + + /** + * Verifies an AdvanceRolloutRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdvanceRolloutRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvanceRolloutRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AdvanceRolloutRule; + + /** + * Creates a plain object from an AdvanceRolloutRule message. Also converts values to other types if specified. + * @param message AdvanceRolloutRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AdvanceRolloutRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvanceRolloutRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvanceRolloutRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RepairRolloutRule. */ + interface IRepairRolloutRule { + + /** RepairRolloutRule id */ + id?: (string|null); + + /** RepairRolloutRule sourcePhases */ + sourcePhases?: (string[]|null); + + /** RepairRolloutRule jobs */ + jobs?: (string[]|null); + + /** RepairRolloutRule repairModes */ + repairModes?: (google.cloud.deploy.v1.IRepairMode[]|null); + + /** RepairRolloutRule condition */ + condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + } + + /** Represents a RepairRolloutRule. */ + class RepairRolloutRule implements IRepairRolloutRule { + + /** + * Constructs a new RepairRolloutRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRepairRolloutRule); + + /** RepairRolloutRule id. */ + public id: string; + + /** RepairRolloutRule sourcePhases. */ + public sourcePhases: string[]; + + /** RepairRolloutRule jobs. */ + public jobs: string[]; + + /** RepairRolloutRule repairModes. */ + public repairModes: google.cloud.deploy.v1.IRepairMode[]; + + /** RepairRolloutRule condition. */ + public condition?: (google.cloud.deploy.v1.IAutomationRuleCondition|null); + + /** + * Creates a new RepairRolloutRule instance using the specified properties. + * @param [properties] Properties to set + * @returns RepairRolloutRule instance + */ + public static create(properties?: google.cloud.deploy.v1.IRepairRolloutRule): google.cloud.deploy.v1.RepairRolloutRule; + + /** + * Encodes the specified RepairRolloutRule message. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutRule.verify|verify} messages. + * @param message RepairRolloutRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRepairRolloutRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepairRolloutRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutRule.verify|verify} messages. + * @param message RepairRolloutRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRepairRolloutRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepairRolloutRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepairRolloutRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RepairRolloutRule; + + /** + * Decodes a RepairRolloutRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepairRolloutRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RepairRolloutRule; + + /** + * Verifies a RepairRolloutRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepairRolloutRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepairRolloutRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RepairRolloutRule; + + /** + * Creates a plain object from a RepairRolloutRule message. Also converts values to other types if specified. + * @param message RepairRolloutRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RepairRolloutRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepairRolloutRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepairRolloutRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RepairMode. */ + interface IRepairMode { + + /** RepairMode retry */ + retry?: (google.cloud.deploy.v1.IRetry|null); + + /** RepairMode rollback */ + rollback?: (google.cloud.deploy.v1.IRollback|null); + } + + /** Represents a RepairMode. */ + class RepairMode implements IRepairMode { + + /** + * Constructs a new RepairMode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRepairMode); + + /** RepairMode retry. */ + public retry?: (google.cloud.deploy.v1.IRetry|null); + + /** RepairMode rollback. */ + public rollback?: (google.cloud.deploy.v1.IRollback|null); + + /** RepairMode mode. */ + public mode?: ("retry"|"rollback"); + + /** + * Creates a new RepairMode instance using the specified properties. + * @param [properties] Properties to set + * @returns RepairMode instance + */ + public static create(properties?: google.cloud.deploy.v1.IRepairMode): google.cloud.deploy.v1.RepairMode; + + /** + * Encodes the specified RepairMode message. Does not implicitly {@link google.cloud.deploy.v1.RepairMode.verify|verify} messages. + * @param message RepairMode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRepairMode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepairMode message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairMode.verify|verify} messages. + * @param message RepairMode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRepairMode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepairMode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepairMode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RepairMode; + + /** + * Decodes a RepairMode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepairMode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RepairMode; + + /** + * Verifies a RepairMode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepairMode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepairMode + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RepairMode; + + /** + * Creates a plain object from a RepairMode message. Also converts values to other types if specified. + * @param message RepairMode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RepairMode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepairMode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepairMode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Retry. */ + interface IRetry { + + /** Retry attempts */ + attempts?: (number|Long|string|null); + + /** Retry wait */ + wait?: (google.protobuf.IDuration|null); + + /** Retry backoffMode */ + backoffMode?: (google.cloud.deploy.v1.BackoffMode|keyof typeof google.cloud.deploy.v1.BackoffMode|null); + } + + /** Represents a Retry. */ + class Retry implements IRetry { + + /** + * Constructs a new Retry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRetry); + + /** Retry attempts. */ + public attempts: (number|Long|string); + + /** Retry wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** Retry backoffMode. */ + public backoffMode: (google.cloud.deploy.v1.BackoffMode|keyof typeof google.cloud.deploy.v1.BackoffMode); + + /** + * Creates a new Retry instance using the specified properties. + * @param [properties] Properties to set + * @returns Retry instance + */ + public static create(properties?: google.cloud.deploy.v1.IRetry): google.cloud.deploy.v1.Retry; + + /** + * Encodes the specified Retry message. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. + * @param message Retry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Retry message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. + * @param message Retry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRetry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Retry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Retry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Retry; + + /** + * Decodes a Retry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Retry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Retry; + + /** + * Verifies a Retry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Retry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Retry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Retry; + + /** + * Creates a plain object from a Retry message. Also converts values to other types if specified. + * @param message Retry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Retry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Retry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Retry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Rollback. */ + interface IRollback { + + /** Rollback destinationPhase */ + destinationPhase?: (string|null); + } + + /** Represents a Rollback. */ + class Rollback implements IRollback { + + /** + * Constructs a new Rollback. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollback); + + /** Rollback destinationPhase. */ + public destinationPhase: string; + + /** + * Creates a new Rollback instance using the specified properties. + * @param [properties] Properties to set + * @returns Rollback instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollback): google.cloud.deploy.v1.Rollback; + + /** + * Encodes the specified Rollback message. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. + * @param message Rollback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Rollback message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. + * @param message Rollback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Rollback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Rollback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Rollback; + + /** + * Decodes a Rollback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Rollback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Rollback; + + /** + * Verifies a Rollback message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Rollback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Rollback + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Rollback; + + /** + * Creates a plain object from a Rollback message. Also converts values to other types if specified. + * @param message Rollback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.Rollback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Rollback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Rollback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutomationRuleCondition. */ + interface IAutomationRuleCondition { + + /** AutomationRuleCondition targetsPresentCondition */ + targetsPresentCondition?: (google.cloud.deploy.v1.ITargetsPresentCondition|null); + } + + /** Represents an AutomationRuleCondition. */ + class AutomationRuleCondition implements IAutomationRuleCondition { + + /** + * Constructs a new AutomationRuleCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationRuleCondition); + + /** AutomationRuleCondition targetsPresentCondition. */ + public targetsPresentCondition?: (google.cloud.deploy.v1.ITargetsPresentCondition|null); + + /** + * Creates a new AutomationRuleCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationRuleCondition instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationRuleCondition): google.cloud.deploy.v1.AutomationRuleCondition; + + /** + * Encodes the specified AutomationRuleCondition message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRuleCondition.verify|verify} messages. + * @param message AutomationRuleCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationRuleCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationRuleCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRuleCondition.verify|verify} messages. + * @param message AutomationRuleCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationRuleCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationRuleCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationRuleCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationRuleCondition; + + /** + * Decodes an AutomationRuleCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationRuleCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationRuleCondition; + + /** + * Verifies an AutomationRuleCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationRuleCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationRuleCondition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationRuleCondition; + + /** + * Creates a plain object from an AutomationRuleCondition message. Also converts values to other types if specified. + * @param message AutomationRuleCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationRuleCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationRuleCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationRuleCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAutomationRequest. */ + interface ICreateAutomationRequest { + + /** CreateAutomationRequest parent */ + parent?: (string|null); + + /** CreateAutomationRequest automationId */ + automationId?: (string|null); + + /** CreateAutomationRequest automation */ + automation?: (google.cloud.deploy.v1.IAutomation|null); + + /** CreateAutomationRequest requestId */ + requestId?: (string|null); + + /** CreateAutomationRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateAutomationRequest. */ + class CreateAutomationRequest implements ICreateAutomationRequest { + + /** + * Constructs a new CreateAutomationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.ICreateAutomationRequest); + + /** CreateAutomationRequest parent. */ + public parent: string; + + /** CreateAutomationRequest automationId. */ + public automationId: string; + + /** CreateAutomationRequest automation. */ + public automation?: (google.cloud.deploy.v1.IAutomation|null); + + /** CreateAutomationRequest requestId. */ + public requestId: string; + + /** CreateAutomationRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateAutomationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAutomationRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.ICreateAutomationRequest): google.cloud.deploy.v1.CreateAutomationRequest; + + /** + * Encodes the specified CreateAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateAutomationRequest.verify|verify} messages. + * @param message CreateAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.ICreateAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateAutomationRequest.verify|verify} messages. + * @param message CreateAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.ICreateAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAutomationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CreateAutomationRequest; + + /** + * Decodes a CreateAutomationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CreateAutomationRequest; + + /** + * Verifies a CreateAutomationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAutomationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAutomationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CreateAutomationRequest; + + /** + * Creates a plain object from a CreateAutomationRequest message. Also converts values to other types if specified. + * @param message CreateAutomationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.CreateAutomationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAutomationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAutomationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAutomationRequest. */ + interface IUpdateAutomationRequest { + + /** UpdateAutomationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAutomationRequest automation */ + automation?: (google.cloud.deploy.v1.IAutomation|null); + + /** UpdateAutomationRequest requestId */ + requestId?: (string|null); + + /** UpdateAutomationRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateAutomationRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateAutomationRequest. */ + class UpdateAutomationRequest implements IUpdateAutomationRequest { + + /** + * Constructs a new UpdateAutomationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IUpdateAutomationRequest); + + /** UpdateAutomationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateAutomationRequest automation. */ + public automation?: (google.cloud.deploy.v1.IAutomation|null); + + /** UpdateAutomationRequest requestId. */ + public requestId: string; + + /** UpdateAutomationRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateAutomationRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateAutomationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAutomationRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IUpdateAutomationRequest): google.cloud.deploy.v1.UpdateAutomationRequest; + + /** + * Encodes the specified UpdateAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateAutomationRequest.verify|verify} messages. + * @param message UpdateAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IUpdateAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateAutomationRequest.verify|verify} messages. + * @param message UpdateAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IUpdateAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAutomationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.UpdateAutomationRequest; + + /** + * Decodes an UpdateAutomationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.UpdateAutomationRequest; + + /** + * Verifies an UpdateAutomationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAutomationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAutomationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.UpdateAutomationRequest; + + /** + * Creates a plain object from an UpdateAutomationRequest message. Also converts values to other types if specified. + * @param message UpdateAutomationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.UpdateAutomationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAutomationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAutomationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAutomationRequest. */ + interface IDeleteAutomationRequest { + + /** DeleteAutomationRequest name */ + name?: (string|null); + + /** DeleteAutomationRequest requestId */ + requestId?: (string|null); + + /** DeleteAutomationRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteAutomationRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteAutomationRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteAutomationRequest. */ + class DeleteAutomationRequest implements IDeleteAutomationRequest { + + /** + * Constructs a new DeleteAutomationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeleteAutomationRequest); + + /** DeleteAutomationRequest name. */ + public name: string; + + /** DeleteAutomationRequest requestId. */ + public requestId: string; + + /** DeleteAutomationRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteAutomationRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteAutomationRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteAutomationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAutomationRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeleteAutomationRequest): google.cloud.deploy.v1.DeleteAutomationRequest; + + /** + * Encodes the specified DeleteAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteAutomationRequest.verify|verify} messages. + * @param message DeleteAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeleteAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteAutomationRequest.verify|verify} messages. + * @param message DeleteAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeleteAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAutomationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.DeleteAutomationRequest; + + /** + * Decodes a DeleteAutomationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.DeleteAutomationRequest; + + /** + * Verifies a DeleteAutomationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAutomationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAutomationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeleteAutomationRequest; + + /** + * Creates a plain object from a DeleteAutomationRequest message. Also converts values to other types if specified. + * @param message DeleteAutomationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeleteAutomationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAutomationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAutomationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutomationsRequest. */ + interface IListAutomationsRequest { + + /** ListAutomationsRequest parent */ + parent?: (string|null); + + /** ListAutomationsRequest pageSize */ + pageSize?: (number|null); + + /** ListAutomationsRequest pageToken */ + pageToken?: (string|null); + + /** ListAutomationsRequest filter */ + filter?: (string|null); + + /** ListAutomationsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAutomationsRequest. */ + class ListAutomationsRequest implements IListAutomationsRequest { + + /** + * Constructs a new ListAutomationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListAutomationsRequest); + + /** ListAutomationsRequest parent. */ + public parent: string; + + /** ListAutomationsRequest pageSize. */ + public pageSize: number; + + /** ListAutomationsRequest pageToken. */ + public pageToken: string; + + /** ListAutomationsRequest filter. */ + public filter: string; + + /** ListAutomationsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAutomationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutomationsRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListAutomationsRequest): google.cloud.deploy.v1.ListAutomationsRequest; + + /** + * Encodes the specified ListAutomationsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsRequest.verify|verify} messages. + * @param message ListAutomationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListAutomationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutomationsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsRequest.verify|verify} messages. + * @param message ListAutomationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListAutomationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutomationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutomationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListAutomationsRequest; + + /** + * Decodes a ListAutomationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutomationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListAutomationsRequest; + + /** + * Verifies a ListAutomationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutomationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutomationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListAutomationsRequest; + + /** + * Creates a plain object from a ListAutomationsRequest message. Also converts values to other types if specified. + * @param message ListAutomationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListAutomationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutomationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutomationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutomationsResponse. */ + interface IListAutomationsResponse { + + /** ListAutomationsResponse automations */ + automations?: (google.cloud.deploy.v1.IAutomation[]|null); + + /** ListAutomationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAutomationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAutomationsResponse. */ + class ListAutomationsResponse implements IListAutomationsResponse { + + /** + * Constructs a new ListAutomationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListAutomationsResponse); + + /** ListAutomationsResponse automations. */ + public automations: google.cloud.deploy.v1.IAutomation[]; + + /** ListAutomationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAutomationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAutomationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutomationsResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListAutomationsResponse): google.cloud.deploy.v1.ListAutomationsResponse; + + /** + * Encodes the specified ListAutomationsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsResponse.verify|verify} messages. + * @param message ListAutomationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListAutomationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutomationsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsResponse.verify|verify} messages. + * @param message ListAutomationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListAutomationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutomationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutomationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListAutomationsResponse; + + /** + * Decodes a ListAutomationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutomationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListAutomationsResponse; + + /** + * Verifies a ListAutomationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutomationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutomationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListAutomationsResponse; + + /** + * Creates a plain object from a ListAutomationsResponse message. Also converts values to other types if specified. + * @param message ListAutomationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListAutomationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutomationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutomationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAutomationRequest. */ + interface IGetAutomationRequest { + + /** GetAutomationRequest name */ + name?: (string|null); + } + + /** Represents a GetAutomationRequest. */ + class GetAutomationRequest implements IGetAutomationRequest { + + /** + * Constructs a new GetAutomationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IGetAutomationRequest); + + /** GetAutomationRequest name. */ + public name: string; + + /** + * Creates a new GetAutomationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAutomationRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IGetAutomationRequest): google.cloud.deploy.v1.GetAutomationRequest; + + /** + * Encodes the specified GetAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRequest.verify|verify} messages. + * @param message GetAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IGetAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRequest.verify|verify} messages. + * @param message GetAutomationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IGetAutomationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAutomationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetAutomationRequest; + + /** + * Decodes a GetAutomationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAutomationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetAutomationRequest; + + /** + * Verifies a GetAutomationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAutomationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAutomationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetAutomationRequest; + + /** + * Creates a plain object from a GetAutomationRequest message. Also converts values to other types if specified. + * @param message GetAutomationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.GetAutomationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAutomationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAutomationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutomationRun. */ + interface IAutomationRun { + + /** AutomationRun name */ + name?: (string|null); + + /** AutomationRun createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun etag */ + etag?: (string|null); + + /** AutomationRun serviceAccount */ + serviceAccount?: (string|null); + + /** AutomationRun automationSnapshot */ + automationSnapshot?: (google.cloud.deploy.v1.IAutomation|null); + + /** AutomationRun targetId */ + targetId?: (string|null); + + /** AutomationRun state */ + state?: (google.cloud.deploy.v1.AutomationRun.State|keyof typeof google.cloud.deploy.v1.AutomationRun.State|null); + + /** AutomationRun stateDescription */ + stateDescription?: (string|null); + + /** AutomationRun expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun ruleId */ + ruleId?: (string|null); + + /** AutomationRun automationId */ + automationId?: (string|null); + + /** AutomationRun promoteReleaseOperation */ + promoteReleaseOperation?: (google.cloud.deploy.v1.IPromoteReleaseOperation|null); + + /** AutomationRun advanceRolloutOperation */ + advanceRolloutOperation?: (google.cloud.deploy.v1.IAdvanceRolloutOperation|null); + + /** AutomationRun repairRolloutOperation */ + repairRolloutOperation?: (google.cloud.deploy.v1.IRepairRolloutOperation|null); + + /** AutomationRun waitUntilTime */ + waitUntilTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an AutomationRun. */ + class AutomationRun implements IAutomationRun { + + /** + * Constructs a new AutomationRun. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAutomationRun); + + /** AutomationRun name. */ + public name: string; + + /** AutomationRun createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun etag. */ + public etag: string; + + /** AutomationRun serviceAccount. */ + public serviceAccount: string; + + /** AutomationRun automationSnapshot. */ + public automationSnapshot?: (google.cloud.deploy.v1.IAutomation|null); + + /** AutomationRun targetId. */ + public targetId: string; + + /** AutomationRun state. */ + public state: (google.cloud.deploy.v1.AutomationRun.State|keyof typeof google.cloud.deploy.v1.AutomationRun.State); + + /** AutomationRun stateDescription. */ + public stateDescription: string; + + /** AutomationRun expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun ruleId. */ + public ruleId: string; + + /** AutomationRun automationId. */ + public automationId: string; + + /** AutomationRun promoteReleaseOperation. */ + public promoteReleaseOperation?: (google.cloud.deploy.v1.IPromoteReleaseOperation|null); + + /** AutomationRun advanceRolloutOperation. */ + public advanceRolloutOperation?: (google.cloud.deploy.v1.IAdvanceRolloutOperation|null); + + /** AutomationRun repairRolloutOperation. */ + public repairRolloutOperation?: (google.cloud.deploy.v1.IRepairRolloutOperation|null); + + /** AutomationRun waitUntilTime. */ + public waitUntilTime?: (google.protobuf.ITimestamp|null); + + /** AutomationRun operation. */ + public operation?: ("promoteReleaseOperation"|"advanceRolloutOperation"|"repairRolloutOperation"); + + /** + * Creates a new AutomationRun instance using the specified properties. + * @param [properties] Properties to set + * @returns AutomationRun instance + */ + public static create(properties?: google.cloud.deploy.v1.IAutomationRun): google.cloud.deploy.v1.AutomationRun; + + /** + * Encodes the specified AutomationRun message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRun.verify|verify} messages. + * @param message AutomationRun message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAutomationRun, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutomationRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRun.verify|verify} messages. + * @param message AutomationRun message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAutomationRun, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutomationRun message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutomationRun + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AutomationRun; + + /** + * Decodes an AutomationRun message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutomationRun + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AutomationRun; + + /** + * Verifies an AutomationRun message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutomationRun message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutomationRun + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AutomationRun; + + /** + * Creates a plain object from an AutomationRun message. Also converts values to other types if specified. + * @param message AutomationRun + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AutomationRun, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutomationRun to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutomationRun + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutomationRun { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + CANCELLED = 2, + FAILED = 3, + IN_PROGRESS = 4, + PENDING = 5 + } + } + + /** Properties of a PromoteReleaseOperation. */ + interface IPromoteReleaseOperation { + + /** PromoteReleaseOperation targetId */ + targetId?: (string|null); + + /** PromoteReleaseOperation wait */ + wait?: (google.protobuf.IDuration|null); + + /** PromoteReleaseOperation rollout */ + rollout?: (string|null); + + /** PromoteReleaseOperation phase */ + phase?: (string|null); + } + + /** Represents a PromoteReleaseOperation. */ + class PromoteReleaseOperation implements IPromoteReleaseOperation { + + /** + * Constructs a new PromoteReleaseOperation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IPromoteReleaseOperation); + + /** PromoteReleaseOperation targetId. */ + public targetId: string; + + /** PromoteReleaseOperation wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** PromoteReleaseOperation rollout. */ + public rollout: string; + + /** PromoteReleaseOperation phase. */ + public phase: string; + + /** + * Creates a new PromoteReleaseOperation instance using the specified properties. + * @param [properties] Properties to set + * @returns PromoteReleaseOperation instance + */ + public static create(properties?: google.cloud.deploy.v1.IPromoteReleaseOperation): google.cloud.deploy.v1.PromoteReleaseOperation; + + /** + * Encodes the specified PromoteReleaseOperation message. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseOperation.verify|verify} messages. + * @param message PromoteReleaseOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IPromoteReleaseOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PromoteReleaseOperation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseOperation.verify|verify} messages. + * @param message PromoteReleaseOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IPromoteReleaseOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PromoteReleaseOperation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PromoteReleaseOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.PromoteReleaseOperation; + + /** + * Decodes a PromoteReleaseOperation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PromoteReleaseOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.PromoteReleaseOperation; + + /** + * Verifies a PromoteReleaseOperation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PromoteReleaseOperation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PromoteReleaseOperation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.PromoteReleaseOperation; + + /** + * Creates a plain object from a PromoteReleaseOperation message. Also converts values to other types if specified. + * @param message PromoteReleaseOperation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.PromoteReleaseOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PromoteReleaseOperation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PromoteReleaseOperation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvanceRolloutOperation. */ + interface IAdvanceRolloutOperation { + + /** AdvanceRolloutOperation sourcePhase */ + sourcePhase?: (string|null); + + /** AdvanceRolloutOperation wait */ + wait?: (google.protobuf.IDuration|null); + + /** AdvanceRolloutOperation rollout */ + rollout?: (string|null); + + /** AdvanceRolloutOperation destinationPhase */ + destinationPhase?: (string|null); + } + + /** Represents an AdvanceRolloutOperation. */ + class AdvanceRolloutOperation implements IAdvanceRolloutOperation { + + /** + * Constructs a new AdvanceRolloutOperation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IAdvanceRolloutOperation); + + /** AdvanceRolloutOperation sourcePhase. */ + public sourcePhase: string; + + /** AdvanceRolloutOperation wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** AdvanceRolloutOperation rollout. */ + public rollout: string; + + /** AdvanceRolloutOperation destinationPhase. */ + public destinationPhase: string; + + /** + * Creates a new AdvanceRolloutOperation instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvanceRolloutOperation instance + */ + public static create(properties?: google.cloud.deploy.v1.IAdvanceRolloutOperation): google.cloud.deploy.v1.AdvanceRolloutOperation; + + /** + * Encodes the specified AdvanceRolloutOperation message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutOperation.verify|verify} messages. + * @param message AdvanceRolloutOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IAdvanceRolloutOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvanceRolloutOperation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutOperation.verify|verify} messages. + * @param message AdvanceRolloutOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IAdvanceRolloutOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvanceRolloutOperation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvanceRolloutOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.AdvanceRolloutOperation; + + /** + * Decodes an AdvanceRolloutOperation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvanceRolloutOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.AdvanceRolloutOperation; + + /** + * Verifies an AdvanceRolloutOperation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdvanceRolloutOperation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvanceRolloutOperation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.AdvanceRolloutOperation; + + /** + * Creates a plain object from an AdvanceRolloutOperation message. Also converts values to other types if specified. + * @param message AdvanceRolloutOperation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.AdvanceRolloutOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvanceRolloutOperation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvanceRolloutOperation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RepairRolloutOperation. */ + interface IRepairRolloutOperation { + + /** RepairRolloutOperation rollout */ + rollout?: (string|null); + + /** RepairRolloutOperation currentRepairModeIndex */ + currentRepairModeIndex?: (number|Long|string|null); + + /** RepairRolloutOperation repairPhases */ + repairPhases?: (google.cloud.deploy.v1.IRepairPhase[]|null); + } + + /** Represents a RepairRolloutOperation. */ + class RepairRolloutOperation implements IRepairRolloutOperation { + + /** + * Constructs a new RepairRolloutOperation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRepairRolloutOperation); + + /** RepairRolloutOperation rollout. */ + public rollout: string; + + /** RepairRolloutOperation currentRepairModeIndex. */ + public currentRepairModeIndex: (number|Long|string); + + /** RepairRolloutOperation repairPhases. */ + public repairPhases: google.cloud.deploy.v1.IRepairPhase[]; + + /** + * Creates a new RepairRolloutOperation instance using the specified properties. + * @param [properties] Properties to set + * @returns RepairRolloutOperation instance + */ + public static create(properties?: google.cloud.deploy.v1.IRepairRolloutOperation): google.cloud.deploy.v1.RepairRolloutOperation; + + /** + * Encodes the specified RepairRolloutOperation message. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutOperation.verify|verify} messages. + * @param message RepairRolloutOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRepairRolloutOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepairRolloutOperation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutOperation.verify|verify} messages. + * @param message RepairRolloutOperation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRepairRolloutOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepairRolloutOperation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepairRolloutOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RepairRolloutOperation; + + /** + * Decodes a RepairRolloutOperation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepairRolloutOperation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RepairRolloutOperation; + + /** + * Verifies a RepairRolloutOperation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepairRolloutOperation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepairRolloutOperation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RepairRolloutOperation; + + /** + * Creates a plain object from a RepairRolloutOperation message. Also converts values to other types if specified. + * @param message RepairRolloutOperation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RepairRolloutOperation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepairRolloutOperation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepairRolloutOperation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RepairPhase. */ + interface IRepairPhase { + + /** RepairPhase retry */ + retry?: (google.cloud.deploy.v1.IRetryPhase|null); + + /** RepairPhase rollback */ + rollback?: (google.cloud.deploy.v1.IRollbackAttempt|null); + } + + /** Represents a RepairPhase. */ + class RepairPhase implements IRepairPhase { + + /** + * Constructs a new RepairPhase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRepairPhase); + + /** RepairPhase retry. */ + public retry?: (google.cloud.deploy.v1.IRetryPhase|null); + + /** RepairPhase rollback. */ + public rollback?: (google.cloud.deploy.v1.IRollbackAttempt|null); + + /** RepairPhase repairPhase. */ + public repairPhase?: ("retry"|"rollback"); + + /** + * Creates a new RepairPhase instance using the specified properties. + * @param [properties] Properties to set + * @returns RepairPhase instance + */ + public static create(properties?: google.cloud.deploy.v1.IRepairPhase): google.cloud.deploy.v1.RepairPhase; + + /** + * Encodes the specified RepairPhase message. Does not implicitly {@link google.cloud.deploy.v1.RepairPhase.verify|verify} messages. + * @param message RepairPhase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRepairPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepairPhase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairPhase.verify|verify} messages. + * @param message RepairPhase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRepairPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepairPhase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepairPhase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RepairPhase; + + /** + * Decodes a RepairPhase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepairPhase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RepairPhase; + + /** + * Verifies a RepairPhase message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepairPhase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepairPhase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RepairPhase; + + /** + * Creates a plain object from a RepairPhase message. Also converts values to other types if specified. + * @param message RepairPhase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RepairPhase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepairPhase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepairPhase + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetryPhase. */ + interface IRetryPhase { + + /** RetryPhase totalAttempts */ + totalAttempts?: (number|Long|string|null); + + /** RetryPhase backoffMode */ + backoffMode?: (google.cloud.deploy.v1.BackoffMode|keyof typeof google.cloud.deploy.v1.BackoffMode|null); + + /** RetryPhase phaseId */ + phaseId?: (string|null); + + /** RetryPhase jobId */ + jobId?: (string|null); + + /** RetryPhase attempts */ + attempts?: (google.cloud.deploy.v1.IRetryAttempt[]|null); + } + + /** Represents a RetryPhase. */ + class RetryPhase implements IRetryPhase { + + /** + * Constructs a new RetryPhase. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRetryPhase); + + /** RetryPhase totalAttempts. */ + public totalAttempts: (number|Long|string); + + /** RetryPhase backoffMode. */ + public backoffMode: (google.cloud.deploy.v1.BackoffMode|keyof typeof google.cloud.deploy.v1.BackoffMode); + + /** RetryPhase phaseId. */ + public phaseId: string; + + /** RetryPhase jobId. */ + public jobId: string; + + /** RetryPhase attempts. */ + public attempts: google.cloud.deploy.v1.IRetryAttempt[]; + + /** + * Creates a new RetryPhase instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryPhase instance + */ + public static create(properties?: google.cloud.deploy.v1.IRetryPhase): google.cloud.deploy.v1.RetryPhase; + + /** + * Encodes the specified RetryPhase message. Does not implicitly {@link google.cloud.deploy.v1.RetryPhase.verify|verify} messages. + * @param message RetryPhase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRetryPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryPhase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryPhase.verify|verify} messages. + * @param message RetryPhase message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRetryPhase, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryPhase message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryPhase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RetryPhase; + + /** + * Decodes a RetryPhase message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryPhase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RetryPhase; + + /** + * Verifies a RetryPhase message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetryPhase message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryPhase + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RetryPhase; + + /** + * Creates a plain object from a RetryPhase message. Also converts values to other types if specified. + * @param message RetryPhase + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RetryPhase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryPhase to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryPhase + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetryAttempt. */ + interface IRetryAttempt { + + /** RetryAttempt attempt */ + attempt?: (number|Long|string|null); + + /** RetryAttempt wait */ + wait?: (google.protobuf.IDuration|null); + + /** RetryAttempt state */ + state?: (google.cloud.deploy.v1.RepairState|keyof typeof google.cloud.deploy.v1.RepairState|null); + + /** RetryAttempt stateDesc */ + stateDesc?: (string|null); + } + + /** Represents a RetryAttempt. */ + class RetryAttempt implements IRetryAttempt { + + /** + * Constructs a new RetryAttempt. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRetryAttempt); + + /** RetryAttempt attempt. */ + public attempt: (number|Long|string); + + /** RetryAttempt wait. */ + public wait?: (google.protobuf.IDuration|null); + + /** RetryAttempt state. */ + public state: (google.cloud.deploy.v1.RepairState|keyof typeof google.cloud.deploy.v1.RepairState); + + /** RetryAttempt stateDesc. */ + public stateDesc: string; + + /** + * Creates a new RetryAttempt instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryAttempt instance + */ + public static create(properties?: google.cloud.deploy.v1.IRetryAttempt): google.cloud.deploy.v1.RetryAttempt; + + /** + * Encodes the specified RetryAttempt message. Does not implicitly {@link google.cloud.deploy.v1.RetryAttempt.verify|verify} messages. + * @param message RetryAttempt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRetryAttempt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryAttempt message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryAttempt.verify|verify} messages. + * @param message RetryAttempt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRetryAttempt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryAttempt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryAttempt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RetryAttempt; + + /** + * Decodes a RetryAttempt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryAttempt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RetryAttempt; + + /** + * Verifies a RetryAttempt message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetryAttempt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryAttempt + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RetryAttempt; + + /** + * Creates a plain object from a RetryAttempt message. Also converts values to other types if specified. + * @param message RetryAttempt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RetryAttempt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryAttempt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryAttempt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RollbackAttempt. */ + interface IRollbackAttempt { + + /** RollbackAttempt destinationPhase */ + destinationPhase?: (string|null); + + /** RollbackAttempt rolloutId */ + rolloutId?: (string|null); + + /** RollbackAttempt state */ + state?: (google.cloud.deploy.v1.RepairState|keyof typeof google.cloud.deploy.v1.RepairState|null); + + /** RollbackAttempt stateDesc */ + stateDesc?: (string|null); + } + + /** Represents a RollbackAttempt. */ + class RollbackAttempt implements IRollbackAttempt { + + /** + * Constructs a new RollbackAttempt. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRollbackAttempt); + + /** RollbackAttempt destinationPhase. */ + public destinationPhase: string; + + /** RollbackAttempt rolloutId. */ + public rolloutId: string; + + /** RollbackAttempt state. */ + public state: (google.cloud.deploy.v1.RepairState|keyof typeof google.cloud.deploy.v1.RepairState); + + /** RollbackAttempt stateDesc. */ + public stateDesc: string; + + /** + * Creates a new RollbackAttempt instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackAttempt instance + */ + public static create(properties?: google.cloud.deploy.v1.IRollbackAttempt): google.cloud.deploy.v1.RollbackAttempt; + + /** + * Encodes the specified RollbackAttempt message. Does not implicitly {@link google.cloud.deploy.v1.RollbackAttempt.verify|verify} messages. + * @param message RollbackAttempt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRollbackAttempt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackAttempt message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackAttempt.verify|verify} messages. + * @param message RollbackAttempt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRollbackAttempt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackAttempt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackAttempt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RollbackAttempt; + + /** + * Decodes a RollbackAttempt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackAttempt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RollbackAttempt; + + /** + * Verifies a RollbackAttempt message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RollbackAttempt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackAttempt + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RollbackAttempt; + + /** + * Creates a plain object from a RollbackAttempt message. Also converts values to other types if specified. + * @param message RollbackAttempt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RollbackAttempt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackAttempt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackAttempt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutomationRunsRequest. */ + interface IListAutomationRunsRequest { + + /** ListAutomationRunsRequest parent */ + parent?: (string|null); + + /** ListAutomationRunsRequest pageSize */ + pageSize?: (number|null); + + /** ListAutomationRunsRequest pageToken */ + pageToken?: (string|null); + + /** ListAutomationRunsRequest filter */ + filter?: (string|null); + + /** ListAutomationRunsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAutomationRunsRequest. */ + class ListAutomationRunsRequest implements IListAutomationRunsRequest { + + /** + * Constructs a new ListAutomationRunsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListAutomationRunsRequest); + + /** ListAutomationRunsRequest parent. */ + public parent: string; + + /** ListAutomationRunsRequest pageSize. */ + public pageSize: number; + + /** ListAutomationRunsRequest pageToken. */ + public pageToken: string; + + /** ListAutomationRunsRequest filter. */ + public filter: string; + + /** ListAutomationRunsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAutomationRunsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutomationRunsRequest instance + */ + public static create(properties?: google.cloud.deploy.v1.IListAutomationRunsRequest): google.cloud.deploy.v1.ListAutomationRunsRequest; + + /** + * Encodes the specified ListAutomationRunsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsRequest.verify|verify} messages. + * @param message ListAutomationRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListAutomationRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutomationRunsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsRequest.verify|verify} messages. + * @param message ListAutomationRunsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListAutomationRunsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutomationRunsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutomationRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListAutomationRunsRequest; + + /** + * Decodes a ListAutomationRunsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutomationRunsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListAutomationRunsRequest; + + /** + * Verifies a ListAutomationRunsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutomationRunsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutomationRunsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListAutomationRunsRequest; + + /** + * Creates a plain object from a ListAutomationRunsRequest message. Also converts values to other types if specified. + * @param message ListAutomationRunsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.ListAutomationRunsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutomationRunsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutomationRunsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutomationRunsResponse. */ + interface IListAutomationRunsResponse { + + /** ListAutomationRunsResponse automationRuns */ + automationRuns?: (google.cloud.deploy.v1.IAutomationRun[]|null); + + /** ListAutomationRunsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAutomationRunsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAutomationRunsResponse. */ + class ListAutomationRunsResponse implements IListAutomationRunsResponse { + + /** + * Constructs a new ListAutomationRunsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IListAutomationRunsResponse); + + /** ListAutomationRunsResponse automationRuns. */ + public automationRuns: google.cloud.deploy.v1.IAutomationRun[]; + + /** ListAutomationRunsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAutomationRunsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAutomationRunsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutomationRunsResponse instance + */ + public static create(properties?: google.cloud.deploy.v1.IListAutomationRunsResponse): google.cloud.deploy.v1.ListAutomationRunsResponse; + + /** + * Encodes the specified ListAutomationRunsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsResponse.verify|verify} messages. + * @param message ListAutomationRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IListAutomationRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutomationRunsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsResponse.verify|verify} messages. + * @param message ListAutomationRunsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IListAutomationRunsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutomationRunsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutomationRunsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.ListAutomationRunsResponse; + + /** + * Decodes a ListAutomationRunsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutomationRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.TerminateJobRunResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.ListAutomationRunsResponse; /** - * Verifies a TerminateJobRunResponse message. + * Verifies a ListAutomationRunsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TerminateJobRunResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAutomationRunsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TerminateJobRunResponse + * @returns ListAutomationRunsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.TerminateJobRunResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.ListAutomationRunsResponse; /** - * Creates a plain object from a TerminateJobRunResponse message. Also converts values to other types if specified. - * @param message TerminateJobRunResponse + * Creates a plain object from a ListAutomationRunsResponse message. Also converts values to other types if specified. + * @param message ListAutomationRunsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.TerminateJobRunResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.ListAutomationRunsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TerminateJobRunResponse to JSON. + * Converts this ListAutomationRunsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TerminateJobRunResponse + * Gets the default type url for ListAutomationRunsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Config. */ - interface IConfig { + /** Properties of a GetAutomationRunRequest. */ + interface IGetAutomationRunRequest { - /** Config name */ + /** GetAutomationRunRequest name */ name?: (string|null); - - /** Config supportedVersions */ - supportedVersions?: (google.cloud.deploy.v1.ISkaffoldVersion[]|null); - - /** Config defaultSkaffoldVersion */ - defaultSkaffoldVersion?: (string|null); } - /** Represents a Config. */ - class Config implements IConfig { + /** Represents a GetAutomationRunRequest. */ + class GetAutomationRunRequest implements IGetAutomationRunRequest { /** - * Constructs a new Config. + * Constructs a new GetAutomationRunRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IConfig); + constructor(properties?: google.cloud.deploy.v1.IGetAutomationRunRequest); - /** Config name. */ + /** GetAutomationRunRequest name. */ public name: string; - /** Config supportedVersions. */ - public supportedVersions: google.cloud.deploy.v1.ISkaffoldVersion[]; - - /** Config defaultSkaffoldVersion. */ - public defaultSkaffoldVersion: string; - /** - * Creates a new Config instance using the specified properties. + * Creates a new GetAutomationRunRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Config instance + * @returns GetAutomationRunRequest instance */ - public static create(properties?: google.cloud.deploy.v1.IConfig): google.cloud.deploy.v1.Config; + public static create(properties?: google.cloud.deploy.v1.IGetAutomationRunRequest): google.cloud.deploy.v1.GetAutomationRunRequest; /** - * Encodes the specified Config message. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. - * @param message Config message or plain object to encode + * Encodes the specified GetAutomationRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRunRequest.verify|verify} messages. + * @param message GetAutomationRunRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.IGetAutomationRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. - * @param message Config message or plain object to encode + * Encodes the specified GetAutomationRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRunRequest.verify|verify} messages. + * @param message GetAutomationRunRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.IGetAutomationRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Config message from the specified reader or buffer. + * Decodes a GetAutomationRunRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Config + * @returns GetAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.Config; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetAutomationRunRequest; /** - * Decodes a Config message from the specified reader or buffer, length delimited. + * Decodes a GetAutomationRunRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Config + * @returns GetAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.Config; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetAutomationRunRequest; /** - * Verifies a Config message. + * Verifies a GetAutomationRunRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Config message from a plain object. Also converts values to their respective internal types. + * Creates a GetAutomationRunRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Config + * @returns GetAutomationRunRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.Config; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetAutomationRunRequest; /** - * Creates a plain object from a Config message. Also converts values to other types if specified. - * @param message Config + * Creates a plain object from a GetAutomationRunRequest message. Also converts values to other types if specified. + * @param message GetAutomationRunRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.Config, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.GetAutomationRunRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Config to JSON. + * Converts this GetAutomationRunRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Config + * Gets the default type url for GetAutomationRunRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SkaffoldVersion. */ - interface ISkaffoldVersion { - - /** SkaffoldVersion version */ - version?: (string|null); - - /** SkaffoldVersion maintenanceModeTime */ - maintenanceModeTime?: (google.protobuf.ITimestamp|null); - - /** SkaffoldVersion supportExpirationTime */ - supportExpirationTime?: (google.protobuf.ITimestamp|null); + /** Properties of a CancelAutomationRunRequest. */ + interface ICancelAutomationRunRequest { - /** SkaffoldVersion supportEndDate */ - supportEndDate?: (google.type.IDate|null); + /** CancelAutomationRunRequest name */ + name?: (string|null); } - /** Represents a SkaffoldVersion. */ - class SkaffoldVersion implements ISkaffoldVersion { + /** Represents a CancelAutomationRunRequest. */ + class CancelAutomationRunRequest implements ICancelAutomationRunRequest { /** - * Constructs a new SkaffoldVersion. + * Constructs a new CancelAutomationRunRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.ISkaffoldVersion); - - /** SkaffoldVersion version. */ - public version: string; - - /** SkaffoldVersion maintenanceModeTime. */ - public maintenanceModeTime?: (google.protobuf.ITimestamp|null); - - /** SkaffoldVersion supportExpirationTime. */ - public supportExpirationTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.deploy.v1.ICancelAutomationRunRequest); - /** SkaffoldVersion supportEndDate. */ - public supportEndDate?: (google.type.IDate|null); + /** CancelAutomationRunRequest name. */ + public name: string; /** - * Creates a new SkaffoldVersion instance using the specified properties. + * Creates a new CancelAutomationRunRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SkaffoldVersion instance + * @returns CancelAutomationRunRequest instance */ - public static create(properties?: google.cloud.deploy.v1.ISkaffoldVersion): google.cloud.deploy.v1.SkaffoldVersion; + public static create(properties?: google.cloud.deploy.v1.ICancelAutomationRunRequest): google.cloud.deploy.v1.CancelAutomationRunRequest; /** - * Encodes the specified SkaffoldVersion message. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. - * @param message SkaffoldVersion message or plain object to encode + * Encodes the specified CancelAutomationRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunRequest.verify|verify} messages. + * @param message CancelAutomationRunRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.ISkaffoldVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.ICancelAutomationRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SkaffoldVersion message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. - * @param message SkaffoldVersion message or plain object to encode + * Encodes the specified CancelAutomationRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunRequest.verify|verify} messages. + * @param message CancelAutomationRunRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.ISkaffoldVersion, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.ICancelAutomationRunRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SkaffoldVersion message from the specified reader or buffer. + * Decodes a CancelAutomationRunRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SkaffoldVersion + * @returns CancelAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.SkaffoldVersion; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CancelAutomationRunRequest; /** - * Decodes a SkaffoldVersion message from the specified reader or buffer, length delimited. + * Decodes a CancelAutomationRunRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SkaffoldVersion + * @returns CancelAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.SkaffoldVersion; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CancelAutomationRunRequest; /** - * Verifies a SkaffoldVersion message. + * Verifies a CancelAutomationRunRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SkaffoldVersion message from a plain object. Also converts values to their respective internal types. + * Creates a CancelAutomationRunRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SkaffoldVersion + * @returns CancelAutomationRunRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.SkaffoldVersion; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CancelAutomationRunRequest; /** - * Creates a plain object from a SkaffoldVersion message. Also converts values to other types if specified. - * @param message SkaffoldVersion + * Creates a plain object from a CancelAutomationRunRequest message. Also converts values to other types if specified. + * @param message CancelAutomationRunRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.SkaffoldVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.CancelAutomationRunRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SkaffoldVersion to JSON. + * Converts this CancelAutomationRunRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SkaffoldVersion + * Gets the default type url for CancelAutomationRunRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetConfigRequest. */ - interface IGetConfigRequest { - - /** GetConfigRequest name */ - name?: (string|null); + /** Properties of a CancelAutomationRunResponse. */ + interface ICancelAutomationRunResponse { } - /** Represents a GetConfigRequest. */ - class GetConfigRequest implements IGetConfigRequest { + /** Represents a CancelAutomationRunResponse. */ + class CancelAutomationRunResponse implements ICancelAutomationRunResponse { /** - * Constructs a new GetConfigRequest. + * Constructs a new CancelAutomationRunResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.deploy.v1.IGetConfigRequest); - - /** GetConfigRequest name. */ - public name: string; + constructor(properties?: google.cloud.deploy.v1.ICancelAutomationRunResponse); /** - * Creates a new GetConfigRequest instance using the specified properties. + * Creates a new CancelAutomationRunResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetConfigRequest instance + * @returns CancelAutomationRunResponse instance */ - public static create(properties?: google.cloud.deploy.v1.IGetConfigRequest): google.cloud.deploy.v1.GetConfigRequest; + public static create(properties?: google.cloud.deploy.v1.ICancelAutomationRunResponse): google.cloud.deploy.v1.CancelAutomationRunResponse; /** - * Encodes the specified GetConfigRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. - * @param message GetConfigRequest message or plain object to encode + * Encodes the specified CancelAutomationRunResponse message. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunResponse.verify|verify} messages. + * @param message CancelAutomationRunResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.deploy.v1.IGetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.deploy.v1.ICancelAutomationRunResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. - * @param message GetConfigRequest message or plain object to encode + * Encodes the specified CancelAutomationRunResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunResponse.verify|verify} messages. + * @param message CancelAutomationRunResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.deploy.v1.IGetConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.deploy.v1.ICancelAutomationRunResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetConfigRequest message from the specified reader or buffer. + * Decodes a CancelAutomationRunResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetConfigRequest + * @returns CancelAutomationRunResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.GetConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.CancelAutomationRunResponse; /** - * Decodes a GetConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a CancelAutomationRunResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetConfigRequest + * @returns CancelAutomationRunResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.GetConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.CancelAutomationRunResponse; /** - * Verifies a GetConfigRequest message. + * Verifies a CancelAutomationRunResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CancelAutomationRunResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetConfigRequest + * @returns CancelAutomationRunResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.GetConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.CancelAutomationRunResponse; /** - * Creates a plain object from a GetConfigRequest message. Also converts values to other types if specified. - * @param message GetConfigRequest + * Creates a plain object from a CancelAutomationRunResponse message. Also converts values to other types if specified. + * @param message CancelAutomationRunResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.deploy.v1.GetConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.deploy.v1.CancelAutomationRunResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetConfigRequest to JSON. + * Converts this CancelAutomationRunResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetConfigRequest + * Gets the default type url for CancelAutomationRunResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -12132,6 +16493,24 @@ export namespace google { SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3 } + /** BackoffMode enum. */ + enum BackoffMode { + BACKOFF_MODE_UNSPECIFIED = 0, + BACKOFF_MODE_LINEAR = 1, + BACKOFF_MODE_EXPONENTIAL = 2 + } + + /** RepairState enum. */ + enum RepairState { + REPAIR_STATE_UNSPECIFIED = 0, + REPAIR_STATE_SUCCEEDED = 1, + REPAIR_STATE_CANCELLED = 2, + REPAIR_STATE_FAILED = 3, + REPAIR_STATE_IN_PROGRESS = 4, + REPAIR_STATE_PENDING = 5, + REPAIR_STATE_SKIPPED = 6 + } + /** Properties of a DeliveryPipelineNotificationEvent. */ interface IDeliveryPipelineNotificationEvent { @@ -12241,18 +16620,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - TYPE_PUBSUB_NOTIFICATION_FAILURE = 1, - TYPE_RESOURCE_STATE_CHANGE = 3, - TYPE_PROCESS_ABORTED = 4, - TYPE_RESTRICTION_VIOLATED = 5, - TYPE_RESOURCE_DELETED = 6, - TYPE_ROLLOUT_UPDATE = 7, - TYPE_RENDER_STATUES_CHANGE = 2 - } - /** Properties of a JobRunNotificationEvent. */ interface IJobRunNotificationEvent { @@ -12503,6 +16870,9 @@ export namespace google { /** ReleaseRenderEvent release */ release?: (string|null); + + /** ReleaseRenderEvent releaseRenderState */ + releaseRenderState?: (google.cloud.deploy.v1.Release.RenderState|keyof typeof google.cloud.deploy.v1.Release.RenderState|null); } /** Represents a ReleaseRenderEvent. */ @@ -12520,6 +16890,9 @@ export namespace google { /** ReleaseRenderEvent release. */ public release: string; + /** ReleaseRenderEvent releaseRenderState. */ + public releaseRenderState: (google.cloud.deploy.v1.Release.RenderState|keyof typeof google.cloud.deploy.v1.Release.RenderState); + /** * Creates a new ReleaseRenderEvent instance using the specified properties. * @param [properties] Properties to set @@ -12725,6 +17098,160 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a RolloutUpdateEvent. */ + interface IRolloutUpdateEvent { + + /** RolloutUpdateEvent pipelineUid */ + pipelineUid?: (string|null); + + /** RolloutUpdateEvent releaseUid */ + releaseUid?: (string|null); + + /** RolloutUpdateEvent rollout */ + rollout?: (string|null); + + /** RolloutUpdateEvent targetId */ + targetId?: (string|null); + + /** RolloutUpdateEvent rolloutUpdateType */ + rolloutUpdateType?: (google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType|keyof typeof google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType|null); + + /** RolloutUpdateEvent message */ + message?: (string|null); + + /** RolloutUpdateEvent type */ + type?: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type|null); + } + + /** Represents a RolloutUpdateEvent. */ + class RolloutUpdateEvent implements IRolloutUpdateEvent { + + /** + * Constructs a new RolloutUpdateEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IRolloutUpdateEvent); + + /** RolloutUpdateEvent pipelineUid. */ + public pipelineUid: string; + + /** RolloutUpdateEvent releaseUid. */ + public releaseUid: string; + + /** RolloutUpdateEvent rollout. */ + public rollout: string; + + /** RolloutUpdateEvent targetId. */ + public targetId: string; + + /** RolloutUpdateEvent rolloutUpdateType. */ + public rolloutUpdateType: (google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType|keyof typeof google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType); + + /** RolloutUpdateEvent message. */ + public message: string; + + /** RolloutUpdateEvent type. */ + public type: (google.cloud.deploy.v1.Type|keyof typeof google.cloud.deploy.v1.Type); + + /** + * Creates a new RolloutUpdateEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns RolloutUpdateEvent instance + */ + public static create(properties?: google.cloud.deploy.v1.IRolloutUpdateEvent): google.cloud.deploy.v1.RolloutUpdateEvent; + + /** + * Encodes the specified RolloutUpdateEvent message. Does not implicitly {@link google.cloud.deploy.v1.RolloutUpdateEvent.verify|verify} messages. + * @param message RolloutUpdateEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IRolloutUpdateEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RolloutUpdateEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RolloutUpdateEvent.verify|verify} messages. + * @param message RolloutUpdateEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IRolloutUpdateEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RolloutUpdateEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RolloutUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.deploy.v1.RolloutUpdateEvent; + + /** + * Decodes a RolloutUpdateEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RolloutUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.deploy.v1.RolloutUpdateEvent; + + /** + * Verifies a RolloutUpdateEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RolloutUpdateEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RolloutUpdateEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.RolloutUpdateEvent; + + /** + * Creates a plain object from a RolloutUpdateEvent message. Also converts values to other types if specified. + * @param message RolloutUpdateEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.RolloutUpdateEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RolloutUpdateEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RolloutUpdateEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RolloutUpdateEvent { + + /** RolloutUpdateType enum. */ + enum RolloutUpdateType { + ROLLOUT_UPDATE_TYPE_UNSPECIFIED = 0, + PENDING = 1, + PENDING_RELEASE = 2, + IN_PROGRESS = 3, + CANCELLING = 4, + CANCELLED = 5, + HALTED = 6, + SUCCEEDED = 7, + FAILED = 8, + APPROVAL_REQUIRED = 9, + APPROVED = 10, + REJECTED = 11, + ADVANCE_REQUIRED = 12, + ADVANCED = 13 + } + } + /** Properties of a TargetNotificationEvent. */ interface ITargetNotificationEvent { diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index 5b4a0c7b32b..71ab7002263 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -66,743 +66,1515 @@ */ var v1 = {}; - v1.CloudDeploy = (function() { + v1.AutomationEvent = (function() { /** - * Constructs a new CloudDeploy service. + * Properties of an AutomationEvent. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CloudDeploy - * @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 CloudDeploy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (CloudDeploy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudDeploy; - - /** - * Creates new CloudDeploy service using the specified rpc implementation. - * @function create - * @memberof google.cloud.deploy.v1.CloudDeploy - * @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 {CloudDeploy} RPC service. Useful where requests and/or responses are streamed. + * @interface IAutomationEvent + * @property {string|null} [message] AutomationEvent message + * @property {string|null} [automation] AutomationEvent automation + * @property {string|null} [pipelineUid] AutomationEvent pipelineUid + * @property {google.cloud.deploy.v1.Type|null} [type] AutomationEvent type */ - CloudDeploy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listDeliveryPipelines}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef ListDeliveryPipelinesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} [response] ListDeliveryPipelinesResponse + * Constructs a new AutomationEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AutomationEvent. + * @implements IAutomationEvent + * @constructor + * @param {google.cloud.deploy.v1.IAutomationEvent=} [properties] Properties to set */ + function AutomationEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListDeliveryPipelines. - * @function listDeliveryPipelines - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.AutomationEvent * @instance - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} request ListDeliveryPipelinesRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelinesCallback} callback Node-style callback called with the error, if any, and ListDeliveryPipelinesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.listDeliveryPipelines = function listDeliveryPipelines(request, callback) { - return this.rpcCall(listDeliveryPipelines, $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse, request, callback); - }, "name", { value: "ListDeliveryPipelines" }); + AutomationEvent.prototype.message = ""; /** - * Calls ListDeliveryPipelines. - * @function listDeliveryPipelines - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationEvent automation. + * @member {string} automation + * @memberof google.cloud.deploy.v1.AutomationEvent * @instance - * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} request ListDeliveryPipelinesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getDeliveryPipeline}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef GetDeliveryPipelineCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.DeliveryPipeline} [response] DeliveryPipeline */ + AutomationEvent.prototype.automation = ""; /** - * Calls GetDeliveryPipeline. - * @function getDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationEvent pipelineUid. + * @member {string} pipelineUid + * @memberof google.cloud.deploy.v1.AutomationEvent * @instance - * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} request GetDeliveryPipelineRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and DeliveryPipeline - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.getDeliveryPipeline = function getDeliveryPipeline(request, callback) { - return this.rpcCall(getDeliveryPipeline, $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest, $root.google.cloud.deploy.v1.DeliveryPipeline, request, callback); - }, "name", { value: "GetDeliveryPipeline" }); + AutomationEvent.prototype.pipelineUid = ""; /** - * Calls GetDeliveryPipeline. - * @function getDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.AutomationEvent * @instance - * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} request GetDeliveryPipelineRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AutomationEvent.prototype.type = 0; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createDeliveryPipeline}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef CreateDeliveryPipelineCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new AutomationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {google.cloud.deploy.v1.IAutomationEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationEvent} AutomationEvent instance */ + AutomationEvent.create = function create(properties) { + return new AutomationEvent(properties); + }; /** - * Calls CreateDeliveryPipeline. - * @function createDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} request CreateDeliveryPipelineRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified AutomationEvent message. Does not implicitly {@link google.cloud.deploy.v1.AutomationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {google.cloud.deploy.v1.IAutomationEvent} message AutomationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(CloudDeploy.prototype.createDeliveryPipeline = function createDeliveryPipeline(request, callback) { - return this.rpcCall(createDeliveryPipeline, $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateDeliveryPipeline" }); + AutomationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.automation != null && Object.hasOwnProperty.call(message, "automation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.automation); + if (message.pipelineUid != null && Object.hasOwnProperty.call(message, "pipelineUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pipelineUid); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + return writer; + }; /** - * Calls CreateDeliveryPipeline. - * @function createDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} request CreateDeliveryPipelineRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AutomationEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {google.cloud.deploy.v1.IAutomationEvent} message AutomationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AutomationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateDeliveryPipeline}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef UpdateDeliveryPipelineCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes an AutomationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AutomationEvent} AutomationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + AutomationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.automation = reader.string(); + break; + } + case 3: { + message.pipelineUid = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls UpdateDeliveryPipeline. - * @function updateDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} request UpdateDeliveryPipelineRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes an AutomationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AutomationEvent} AutomationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(CloudDeploy.prototype.updateDeliveryPipeline = function updateDeliveryPipeline(request, callback) { - return this.rpcCall(updateDeliveryPipeline, $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDeliveryPipeline" }); + AutomationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateDeliveryPipeline. - * @function updateDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} request UpdateDeliveryPipelineRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an AutomationEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + AutomationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.automation != null && message.hasOwnProperty("automation")) + if (!$util.isString(message.automation)) + return "automation: string expected"; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + if (!$util.isString(message.pipelineUid)) + return "pipelineUid: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 2: + break; + } + return null; + }; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteDeliveryPipeline}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef DeleteDeliveryPipelineCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates an AutomationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AutomationEvent} AutomationEvent */ + AutomationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationEvent) + return object; + var message = new $root.google.cloud.deploy.v1.AutomationEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.automation != null) + message.automation = String(object.automation); + if (object.pipelineUid != null) + message.pipelineUid = String(object.pipelineUid); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RESOURCE_STATE_CHANGE": + case 3: + message.type = 3; + break; + case "TYPE_PROCESS_ABORTED": + case 4: + message.type = 4; + break; + case "TYPE_RESTRICTION_VIOLATED": + case 5: + message.type = 5; + break; + case "TYPE_RESOURCE_DELETED": + case 6: + message.type = 6; + break; + case "TYPE_ROLLOUT_UPDATE": + case 7: + message.type = 7; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; /** - * Calls DeleteDeliveryPipeline. - * @function deleteDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} request DeleteDeliveryPipelineRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from an AutomationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {google.cloud.deploy.v1.AutomationEvent} message AutomationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(CloudDeploy.prototype.deleteDeliveryPipeline = function deleteDeliveryPipeline(request, callback) { - return this.rpcCall(deleteDeliveryPipeline, $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteDeliveryPipeline" }); + AutomationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.automation = ""; + object.pipelineUid = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.automation != null && message.hasOwnProperty("automation")) + object.automation = message.automation; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + object.pipelineUid = message.pipelineUid; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] === undefined ? message.type : $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; /** - * Calls DeleteDeliveryPipeline. - * @function deleteDeliveryPipeline - * @memberof google.cloud.deploy.v1.CloudDeploy + * Converts this AutomationEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AutomationEvent * @instance - * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} request DeleteDeliveryPipelineRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + AutomationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listTargets}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef ListTargetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.ListTargetsResponse} [response] ListTargetsResponse + * Gets the default type url for AutomationEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AutomationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + AutomationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationEvent"; + }; - /** - * Calls ListTargets. - * @function listTargets - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IListTargetsRequest} request ListTargetsRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.ListTargetsCallback} callback Node-style callback called with the error, if any, and ListTargetsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CloudDeploy.prototype.listTargets = function listTargets(request, callback) { - return this.rpcCall(listTargets, $root.google.cloud.deploy.v1.ListTargetsRequest, $root.google.cloud.deploy.v1.ListTargetsResponse, request, callback); - }, "name", { value: "ListTargets" }); + return AutomationEvent; + })(); - /** - * Calls ListTargets. - * @function listTargets - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IListTargetsRequest} request ListTargetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Type enum. + * @name google.cloud.deploy.v1.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TYPE_PUBSUB_NOTIFICATION_FAILURE=1 TYPE_PUBSUB_NOTIFICATION_FAILURE value + * @property {number} TYPE_RESOURCE_STATE_CHANGE=3 TYPE_RESOURCE_STATE_CHANGE value + * @property {number} TYPE_PROCESS_ABORTED=4 TYPE_PROCESS_ABORTED value + * @property {number} TYPE_RESTRICTION_VIOLATED=5 TYPE_RESTRICTION_VIOLATED value + * @property {number} TYPE_RESOURCE_DELETED=6 TYPE_RESOURCE_DELETED value + * @property {number} TYPE_ROLLOUT_UPDATE=7 TYPE_ROLLOUT_UPDATE value + * @property {number} TYPE_RENDER_STATUES_CHANGE=2 TYPE_RENDER_STATUES_CHANGE value + */ + v1.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_PUBSUB_NOTIFICATION_FAILURE"] = 1; + values[valuesById[3] = "TYPE_RESOURCE_STATE_CHANGE"] = 3; + values[valuesById[4] = "TYPE_PROCESS_ABORTED"] = 4; + values[valuesById[5] = "TYPE_RESTRICTION_VIOLATED"] = 5; + values[valuesById[6] = "TYPE_RESOURCE_DELETED"] = 6; + values[valuesById[7] = "TYPE_ROLLOUT_UPDATE"] = 7; + values[valuesById[2] = "TYPE_RENDER_STATUES_CHANGE"] = 2; + return values; + })(); + + v1.AutomationRunEvent = (function() { /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getTarget}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef GetTargetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.Target} [response] Target + * Properties of an AutomationRunEvent. + * @memberof google.cloud.deploy.v1 + * @interface IAutomationRunEvent + * @property {string|null} [message] AutomationRunEvent message + * @property {string|null} [automationRun] AutomationRunEvent automationRun + * @property {string|null} [pipelineUid] AutomationRunEvent pipelineUid + * @property {string|null} [automationId] AutomationRunEvent automationId + * @property {string|null} [ruleId] AutomationRunEvent ruleId + * @property {string|null} [destinationTargetId] AutomationRunEvent destinationTargetId + * @property {google.cloud.deploy.v1.Type|null} [type] AutomationRunEvent type */ /** - * Calls GetTarget. - * @function getTarget - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IGetTargetRequest} request GetTargetRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.GetTargetCallback} callback Node-style callback called with the error, if any, and Target - * @returns {undefined} - * @variation 1 + * Constructs a new AutomationRunEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AutomationRunEvent. + * @implements IAutomationRunEvent + * @constructor + * @param {google.cloud.deploy.v1.IAutomationRunEvent=} [properties] Properties to set */ - Object.defineProperty(CloudDeploy.prototype.getTarget = function getTarget(request, callback) { - return this.rpcCall(getTarget, $root.google.cloud.deploy.v1.GetTargetRequest, $root.google.cloud.deploy.v1.Target, request, callback); - }, "name", { value: "GetTarget" }); + function AutomationRunEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls GetTarget. - * @function getTarget - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationRunEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.AutomationRunEvent * @instance - * @param {google.cloud.deploy.v1.IGetTargetRequest} request GetTargetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AutomationRunEvent.prototype.message = ""; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createTarget}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef CreateTargetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * AutomationRunEvent automationRun. + * @member {string} automationRun + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @instance */ + AutomationRunEvent.prototype.automationRun = ""; /** - * Calls CreateTarget. - * @function createTarget - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationRunEvent pipelineUid. + * @member {string} pipelineUid + * @memberof google.cloud.deploy.v1.AutomationRunEvent * @instance - * @param {google.cloud.deploy.v1.ICreateTargetRequest} request CreateTargetRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.CreateTargetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.createTarget = function createTarget(request, callback) { - return this.rpcCall(createTarget, $root.google.cloud.deploy.v1.CreateTargetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTarget" }); + AutomationRunEvent.prototype.pipelineUid = ""; /** - * Calls CreateTarget. - * @function createTarget - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationRunEvent automationId. + * @member {string} automationId + * @memberof google.cloud.deploy.v1.AutomationRunEvent * @instance - * @param {google.cloud.deploy.v1.ICreateTargetRequest} request CreateTargetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AutomationRunEvent.prototype.automationId = ""; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateTarget}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef UpdateTargetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * AutomationRunEvent ruleId. + * @member {string} ruleId + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @instance */ + AutomationRunEvent.prototype.ruleId = ""; /** - * Calls UpdateTarget. - * @function updateTarget - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationRunEvent destinationTargetId. + * @member {string} destinationTargetId + * @memberof google.cloud.deploy.v1.AutomationRunEvent * @instance - * @param {google.cloud.deploy.v1.IUpdateTargetRequest} request UpdateTargetRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.UpdateTargetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.updateTarget = function updateTarget(request, callback) { - return this.rpcCall(updateTarget, $root.google.cloud.deploy.v1.UpdateTargetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateTarget" }); + AutomationRunEvent.prototype.destinationTargetId = ""; /** - * Calls UpdateTarget. - * @function updateTarget - * @memberof google.cloud.deploy.v1.CloudDeploy + * AutomationRunEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.AutomationRunEvent * @instance - * @param {google.cloud.deploy.v1.IUpdateTargetRequest} request UpdateTargetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + AutomationRunEvent.prototype.type = 0; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteTarget}. - * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef DeleteTargetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new AutomationRunEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {google.cloud.deploy.v1.IAutomationRunEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationRunEvent} AutomationRunEvent instance */ + AutomationRunEvent.create = function create(properties) { + return new AutomationRunEvent(properties); + }; /** - * Calls DeleteTarget. - * @function deleteTarget - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IDeleteTargetRequest} request DeleteTargetRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.DeleteTargetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified AutomationRunEvent message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRunEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {google.cloud.deploy.v1.IAutomationRunEvent} message AutomationRunEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(CloudDeploy.prototype.deleteTarget = function deleteTarget(request, callback) { - return this.rpcCall(deleteTarget, $root.google.cloud.deploy.v1.DeleteTargetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTarget" }); + AutomationRunEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.automationRun != null && Object.hasOwnProperty.call(message, "automationRun")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.automationRun); + if (message.pipelineUid != null && Object.hasOwnProperty.call(message, "pipelineUid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pipelineUid); + if (message.automationId != null && Object.hasOwnProperty.call(message, "automationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.automationId); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.ruleId); + if (message.destinationTargetId != null && Object.hasOwnProperty.call(message, "destinationTargetId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.destinationTargetId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + return writer; + }; /** - * Calls DeleteTarget. - * @function deleteTarget - * @memberof google.cloud.deploy.v1.CloudDeploy - * @instance - * @param {google.cloud.deploy.v1.IDeleteTargetRequest} request DeleteTargetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified AutomationRunEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRunEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {google.cloud.deploy.v1.IAutomationRunEvent} message AutomationRunEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + AutomationRunEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listReleases}. + * Decodes an AutomationRunEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AutomationRunEvent} AutomationRunEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomationRunEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationRunEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.automationRun = reader.string(); + break; + } + case 3: { + message.pipelineUid = reader.string(); + break; + } + case 4: { + message.automationId = reader.string(); + break; + } + case 5: { + message.ruleId = reader.string(); + break; + } + case 6: { + message.destinationTargetId = reader.string(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomationRunEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AutomationRunEvent} AutomationRunEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomationRunEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomationRunEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomationRunEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.automationRun != null && message.hasOwnProperty("automationRun")) + if (!$util.isString(message.automationRun)) + return "automationRun: string expected"; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + if (!$util.isString(message.pipelineUid)) + return "pipelineUid: string expected"; + if (message.automationId != null && message.hasOwnProperty("automationId")) + if (!$util.isString(message.automationId)) + return "automationId: string expected"; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.destinationTargetId != null && message.hasOwnProperty("destinationTargetId")) + if (!$util.isString(message.destinationTargetId)) + return "destinationTargetId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 2: + break; + } + return null; + }; + + /** + * Creates an AutomationRunEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AutomationRunEvent} AutomationRunEvent + */ + AutomationRunEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationRunEvent) + return object; + var message = new $root.google.cloud.deploy.v1.AutomationRunEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.automationRun != null) + message.automationRun = String(object.automationRun); + if (object.pipelineUid != null) + message.pipelineUid = String(object.pipelineUid); + if (object.automationId != null) + message.automationId = String(object.automationId); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.destinationTargetId != null) + message.destinationTargetId = String(object.destinationTargetId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RESOURCE_STATE_CHANGE": + case 3: + message.type = 3; + break; + case "TYPE_PROCESS_ABORTED": + case 4: + message.type = 4; + break; + case "TYPE_RESTRICTION_VIOLATED": + case 5: + message.type = 5; + break; + case "TYPE_RESOURCE_DELETED": + case 6: + message.type = 6; + break; + case "TYPE_ROLLOUT_UPDATE": + case 7: + message.type = 7; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AutomationRunEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {google.cloud.deploy.v1.AutomationRunEvent} message AutomationRunEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomationRunEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.automationRun = ""; + object.pipelineUid = ""; + object.automationId = ""; + object.ruleId = ""; + object.destinationTargetId = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.automationRun != null && message.hasOwnProperty("automationRun")) + object.automationRun = message.automationRun; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + object.pipelineUid = message.pipelineUid; + if (message.automationId != null && message.hasOwnProperty("automationId")) + object.automationId = message.automationId; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.destinationTargetId != null && message.hasOwnProperty("destinationTargetId")) + object.destinationTargetId = message.destinationTargetId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] === undefined ? message.type : $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this AutomationRunEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @instance + * @returns {Object.} JSON object + */ + AutomationRunEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomationRunEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AutomationRunEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomationRunEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationRunEvent"; + }; + + return AutomationRunEvent; + })(); + + v1.CloudDeploy = (function() { + + /** + * Constructs a new CloudDeploy service. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CloudDeploy + * @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 CloudDeploy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CloudDeploy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudDeploy; + + /** + * Creates new CloudDeploy service using the specified rpc implementation. + * @function create * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef ListReleasesCallback + * @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 {CloudDeploy} RPC service. Useful where requests and/or responses are streamed. + */ + CloudDeploy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listDeliveryPipelines}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListDeliveryPipelinesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.ListReleasesResponse} [response] ListReleasesResponse + * @param {google.cloud.deploy.v1.ListDeliveryPipelinesResponse} [response] ListDeliveryPipelinesResponse */ /** - * Calls ListReleases. - * @function listReleases + * Calls ListDeliveryPipelines. + * @function listDeliveryPipelines * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IListReleasesRequest} request ListReleasesRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.ListReleasesCallback} callback Node-style callback called with the error, if any, and ListReleasesResponse + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} request ListDeliveryPipelinesRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListDeliveryPipelinesCallback} callback Node-style callback called with the error, if any, and ListDeliveryPipelinesResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.listReleases = function listReleases(request, callback) { - return this.rpcCall(listReleases, $root.google.cloud.deploy.v1.ListReleasesRequest, $root.google.cloud.deploy.v1.ListReleasesResponse, request, callback); - }, "name", { value: "ListReleases" }); + Object.defineProperty(CloudDeploy.prototype.listDeliveryPipelines = function listDeliveryPipelines(request, callback) { + return this.rpcCall(listDeliveryPipelines, $root.google.cloud.deploy.v1.ListDeliveryPipelinesRequest, $root.google.cloud.deploy.v1.ListDeliveryPipelinesResponse, request, callback); + }, "name", { value: "ListDeliveryPipelines" }); /** - * Calls ListReleases. - * @function listReleases + * Calls ListDeliveryPipelines. + * @function listDeliveryPipelines * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IListReleasesRequest} request ListReleasesRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IListDeliveryPipelinesRequest} request ListDeliveryPipelinesRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef GetReleaseCallback + * @typedef GetDeliveryPipelineCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.Release} [response] Release + * @param {google.cloud.deploy.v1.DeliveryPipeline} [response] DeliveryPipeline */ /** - * Calls GetRelease. - * @function getRelease + * Calls GetDeliveryPipeline. + * @function getDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IGetReleaseRequest} request GetReleaseRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.GetReleaseCallback} callback Node-style callback called with the error, if any, and Release + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} request GetDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and DeliveryPipeline * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.getRelease = function getRelease(request, callback) { - return this.rpcCall(getRelease, $root.google.cloud.deploy.v1.GetReleaseRequest, $root.google.cloud.deploy.v1.Release, request, callback); - }, "name", { value: "GetRelease" }); + Object.defineProperty(CloudDeploy.prototype.getDeliveryPipeline = function getDeliveryPipeline(request, callback) { + return this.rpcCall(getDeliveryPipeline, $root.google.cloud.deploy.v1.GetDeliveryPipelineRequest, $root.google.cloud.deploy.v1.DeliveryPipeline, request, callback); + }, "name", { value: "GetDeliveryPipeline" }); /** - * Calls GetRelease. - * @function getRelease + * Calls GetDeliveryPipeline. + * @function getDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IGetReleaseRequest} request GetReleaseRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IGetDeliveryPipelineRequest} request GetDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef CreateReleaseCallback + * @typedef CreateDeliveryPipelineCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls CreateRelease. - * @function createRelease + * Calls CreateDeliveryPipeline. + * @function createDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.ICreateReleaseRequest} request CreateReleaseRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.CreateReleaseCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} request CreateDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.createRelease = function createRelease(request, callback) { - return this.rpcCall(createRelease, $root.google.cloud.deploy.v1.CreateReleaseRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateRelease" }); + Object.defineProperty(CloudDeploy.prototype.createDeliveryPipeline = function createDeliveryPipeline(request, callback) { + return this.rpcCall(createDeliveryPipeline, $root.google.cloud.deploy.v1.CreateDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDeliveryPipeline" }); /** - * Calls CreateRelease. - * @function createRelease + * Calls CreateDeliveryPipeline. + * @function createDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.ICreateReleaseRequest} request CreateReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.ICreateDeliveryPipelineRequest} request CreateDeliveryPipelineRequest message or plain object * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|abandonRelease}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef AbandonReleaseCallback + * @typedef UpdateDeliveryPipelineCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.AbandonReleaseResponse} [response] AbandonReleaseResponse + * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls AbandonRelease. - * @function abandonRelease + * Calls UpdateDeliveryPipeline. + * @function updateDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} request AbandonReleaseRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.AbandonReleaseCallback} callback Node-style callback called with the error, if any, and AbandonReleaseResponse + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} request UpdateDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.UpdateDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.abandonRelease = function abandonRelease(request, callback) { - return this.rpcCall(abandonRelease, $root.google.cloud.deploy.v1.AbandonReleaseRequest, $root.google.cloud.deploy.v1.AbandonReleaseResponse, request, callback); - }, "name", { value: "AbandonRelease" }); + Object.defineProperty(CloudDeploy.prototype.updateDeliveryPipeline = function updateDeliveryPipeline(request, callback) { + return this.rpcCall(updateDeliveryPipeline, $root.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDeliveryPipeline" }); /** - * Calls AbandonRelease. - * @function abandonRelease + * Calls UpdateDeliveryPipeline. + * @function updateDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} request AbandonReleaseRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest} request UpdateDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|approveRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteDeliveryPipeline}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef ApproveRolloutCallback + * @typedef DeleteDeliveryPipelineCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.ApproveRolloutResponse} [response] ApproveRolloutResponse + * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls ApproveRollout. - * @function approveRollout + * Calls DeleteDeliveryPipeline. + * @function deleteDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IApproveRolloutRequest} request ApproveRolloutRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.ApproveRolloutCallback} callback Node-style callback called with the error, if any, and ApproveRolloutResponse + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} request DeleteDeliveryPipelineRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.DeleteDeliveryPipelineCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.approveRollout = function approveRollout(request, callback) { - return this.rpcCall(approveRollout, $root.google.cloud.deploy.v1.ApproveRolloutRequest, $root.google.cloud.deploy.v1.ApproveRolloutResponse, request, callback); - }, "name", { value: "ApproveRollout" }); + Object.defineProperty(CloudDeploy.prototype.deleteDeliveryPipeline = function deleteDeliveryPipeline(request, callback) { + return this.rpcCall(deleteDeliveryPipeline, $root.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDeliveryPipeline" }); /** - * Calls ApproveRollout. - * @function approveRollout + * Calls DeleteDeliveryPipeline. + * @function deleteDeliveryPipeline * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IApproveRolloutRequest} request ApproveRolloutRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest} request DeleteDeliveryPipelineRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|advanceRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listTargets}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef AdvanceRolloutCallback + * @typedef ListTargetsCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.AdvanceRolloutResponse} [response] AdvanceRolloutResponse + * @param {google.cloud.deploy.v1.ListTargetsResponse} [response] ListTargetsResponse */ /** - * Calls AdvanceRollout. - * @function advanceRollout + * Calls ListTargets. + * @function listTargets * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} request AdvanceRolloutRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.AdvanceRolloutCallback} callback Node-style callback called with the error, if any, and AdvanceRolloutResponse + * @param {google.cloud.deploy.v1.IListTargetsRequest} request ListTargetsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListTargetsCallback} callback Node-style callback called with the error, if any, and ListTargetsResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.advanceRollout = function advanceRollout(request, callback) { - return this.rpcCall(advanceRollout, $root.google.cloud.deploy.v1.AdvanceRolloutRequest, $root.google.cloud.deploy.v1.AdvanceRolloutResponse, request, callback); - }, "name", { value: "AdvanceRollout" }); + Object.defineProperty(CloudDeploy.prototype.listTargets = function listTargets(request, callback) { + return this.rpcCall(listTargets, $root.google.cloud.deploy.v1.ListTargetsRequest, $root.google.cloud.deploy.v1.ListTargetsResponse, request, callback); + }, "name", { value: "ListTargets" }); /** - * Calls AdvanceRollout. - * @function advanceRollout + * Calls ListTargets. + * @function listTargets * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} request AdvanceRolloutRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IListTargetsRequest} request ListTargetsRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|cancelRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|rollbackTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef CancelRolloutCallback + * @typedef RollbackTargetCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.CancelRolloutResponse} [response] CancelRolloutResponse + * @param {google.cloud.deploy.v1.RollbackTargetResponse} [response] RollbackTargetResponse */ /** - * Calls CancelRollout. - * @function cancelRollout + * Calls RollbackTarget. + * @function rollbackTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.ICancelRolloutRequest} request CancelRolloutRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.CancelRolloutCallback} callback Node-style callback called with the error, if any, and CancelRolloutResponse + * @param {google.cloud.deploy.v1.IRollbackTargetRequest} request RollbackTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.RollbackTargetCallback} callback Node-style callback called with the error, if any, and RollbackTargetResponse * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.cancelRollout = function cancelRollout(request, callback) { - return this.rpcCall(cancelRollout, $root.google.cloud.deploy.v1.CancelRolloutRequest, $root.google.cloud.deploy.v1.CancelRolloutResponse, request, callback); - }, "name", { value: "CancelRollout" }); + Object.defineProperty(CloudDeploy.prototype.rollbackTarget = function rollbackTarget(request, callback) { + return this.rpcCall(rollbackTarget, $root.google.cloud.deploy.v1.RollbackTargetRequest, $root.google.cloud.deploy.v1.RollbackTargetResponse, request, callback); + }, "name", { value: "RollbackTarget" }); /** - * Calls CancelRollout. - * @function cancelRollout + * Calls RollbackTarget. + * @function rollbackTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.ICancelRolloutRequest} request CancelRolloutRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IRollbackTargetRequest} request RollbackTargetRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listRollouts}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef ListRolloutsCallback + * @typedef GetTargetCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.ListRolloutsResponse} [response] ListRolloutsResponse + * @param {google.cloud.deploy.v1.Target} [response] Target */ /** - * Calls ListRollouts. - * @function listRollouts + * Calls GetTarget. + * @function getTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IListRolloutsRequest} request ListRolloutsRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.ListRolloutsCallback} callback Node-style callback called with the error, if any, and ListRolloutsResponse + * @param {google.cloud.deploy.v1.IGetTargetRequest} request GetTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetTargetCallback} callback Node-style callback called with the error, if any, and Target * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.listRollouts = function listRollouts(request, callback) { - return this.rpcCall(listRollouts, $root.google.cloud.deploy.v1.ListRolloutsRequest, $root.google.cloud.deploy.v1.ListRolloutsResponse, request, callback); - }, "name", { value: "ListRollouts" }); + Object.defineProperty(CloudDeploy.prototype.getTarget = function getTarget(request, callback) { + return this.rpcCall(getTarget, $root.google.cloud.deploy.v1.GetTargetRequest, $root.google.cloud.deploy.v1.Target, request, callback); + }, "name", { value: "GetTarget" }); /** - * Calls ListRollouts. - * @function listRollouts + * Calls GetTarget. + * @function getTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IListRolloutsRequest} request ListRolloutsRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IGetTargetRequest} request GetTargetRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef GetRolloutCallback + * @typedef CreateTargetCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.Rollout} [response] Rollout + * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls GetRollout. - * @function getRollout + * Calls CreateTarget. + * @function createTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IGetRolloutRequest} request GetRolloutRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.GetRolloutCallback} callback Node-style callback called with the error, if any, and Rollout + * @param {google.cloud.deploy.v1.ICreateTargetRequest} request CreateTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateTargetCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.getRollout = function getRollout(request, callback) { - return this.rpcCall(getRollout, $root.google.cloud.deploy.v1.GetRolloutRequest, $root.google.cloud.deploy.v1.Rollout, request, callback); - }, "name", { value: "GetRollout" }); + Object.defineProperty(CloudDeploy.prototype.createTarget = function createTarget(request, callback) { + return this.rpcCall(createTarget, $root.google.cloud.deploy.v1.CreateTargetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTarget" }); /** - * Calls GetRollout. - * @function getRollout + * Calls CreateTarget. + * @function createTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IGetRolloutRequest} request GetRolloutRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.ICreateTargetRequest} request CreateTargetRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRollout}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef CreateRolloutCallback + * @typedef UpdateTargetCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls CreateRollout. - * @function createRollout + * Calls UpdateTarget. + * @function updateTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.ICreateRolloutRequest} request CreateRolloutRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.CreateRolloutCallback} callback Node-style callback called with the error, if any, and Operation + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} request UpdateTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.UpdateTargetCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.createRollout = function createRollout(request, callback) { - return this.rpcCall(createRollout, $root.google.cloud.deploy.v1.CreateRolloutRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateRollout" }); + Object.defineProperty(CloudDeploy.prototype.updateTarget = function updateTarget(request, callback) { + return this.rpcCall(updateTarget, $root.google.cloud.deploy.v1.UpdateTargetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTarget" }); /** - * Calls CreateRollout. - * @function createRollout + * Calls UpdateTarget. + * @function updateTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.ICreateRolloutRequest} request CreateRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} request UpdateTargetRequest message or plain object * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|ignoreJob}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteTarget}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef IgnoreJobCallback + * @typedef DeleteTargetCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.IgnoreJobResponse} [response] IgnoreJobResponse + * @param {google.longrunning.Operation} [response] Operation */ /** - * Calls IgnoreJob. - * @function ignoreJob + * Calls DeleteTarget. + * @function deleteTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IIgnoreJobRequest} request IgnoreJobRequest message or plain object - * @param {google.cloud.deploy.v1.CloudDeploy.IgnoreJobCallback} callback Node-style callback called with the error, if any, and IgnoreJobResponse + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} request DeleteTargetRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.DeleteTargetCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ - Object.defineProperty(CloudDeploy.prototype.ignoreJob = function ignoreJob(request, callback) { - return this.rpcCall(ignoreJob, $root.google.cloud.deploy.v1.IgnoreJobRequest, $root.google.cloud.deploy.v1.IgnoreJobResponse, request, callback); - }, "name", { value: "IgnoreJob" }); + Object.defineProperty(CloudDeploy.prototype.deleteTarget = function deleteTarget(request, callback) { + return this.rpcCall(deleteTarget, $root.google.cloud.deploy.v1.DeleteTargetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTarget" }); /** - * Calls IgnoreJob. - * @function ignoreJob + * Calls DeleteTarget. + * @function deleteTarget * @memberof google.cloud.deploy.v1.CloudDeploy * @instance - * @param {google.cloud.deploy.v1.IIgnoreJobRequest} request IgnoreJobRequest message or plain object - * @returns {Promise} Promise + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} request DeleteTargetRequest message or plain object + * @returns {Promise} Promise * @variation 2 */ /** - * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|retryJob}. + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listReleases}. * @memberof google.cloud.deploy.v1.CloudDeploy - * @typedef RetryJobCallback + * @typedef ListReleasesCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.cloud.deploy.v1.RetryJobResponse} [response] RetryJobResponse + * @param {google.cloud.deploy.v1.ListReleasesResponse} [response] ListReleasesResponse */ /** - * Calls RetryJob. - * @function retryJob + * Calls ListReleases. + * @function listReleases + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListReleasesRequest} request ListReleasesRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListReleasesCallback} callback Node-style callback called with the error, if any, and ListReleasesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listReleases = function listReleases(request, callback) { + return this.rpcCall(listReleases, $root.google.cloud.deploy.v1.ListReleasesRequest, $root.google.cloud.deploy.v1.ListReleasesResponse, request, callback); + }, "name", { value: "ListReleases" }); + + /** + * Calls ListReleases. + * @function listReleases + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListReleasesRequest} request ListReleasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRelease}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetReleaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Release} [response] Release + */ + + /** + * Calls GetRelease. + * @function getRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetReleaseRequest} request GetReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetReleaseCallback} callback Node-style callback called with the error, if any, and Release + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getRelease = function getRelease(request, callback) { + return this.rpcCall(getRelease, $root.google.cloud.deploy.v1.GetReleaseRequest, $root.google.cloud.deploy.v1.Release, request, callback); + }, "name", { value: "GetRelease" }); + + /** + * Calls GetRelease. + * @function getRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetReleaseRequest} request GetReleaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRelease}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateReleaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRelease. + * @function createRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} request CreateReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateReleaseCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createRelease = function createRelease(request, callback) { + return this.rpcCall(createRelease, $root.google.cloud.deploy.v1.CreateReleaseRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRelease" }); + + /** + * Calls CreateRelease. + * @function createRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} request CreateReleaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|abandonRelease}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef AbandonReleaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.AbandonReleaseResponse} [response] AbandonReleaseResponse + */ + + /** + * Calls AbandonRelease. + * @function abandonRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} request AbandonReleaseRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.AbandonReleaseCallback} callback Node-style callback called with the error, if any, and AbandonReleaseResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.abandonRelease = function abandonRelease(request, callback) { + return this.rpcCall(abandonRelease, $root.google.cloud.deploy.v1.AbandonReleaseRequest, $root.google.cloud.deploy.v1.AbandonReleaseResponse, request, callback); + }, "name", { value: "AbandonRelease" }); + + /** + * Calls AbandonRelease. + * @function abandonRelease + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} request AbandonReleaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|approveRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ApproveRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ApproveRolloutResponse} [response] ApproveRolloutResponse + */ + + /** + * Calls ApproveRollout. + * @function approveRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} request ApproveRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ApproveRolloutCallback} callback Node-style callback called with the error, if any, and ApproveRolloutResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.approveRollout = function approveRollout(request, callback) { + return this.rpcCall(approveRollout, $root.google.cloud.deploy.v1.ApproveRolloutRequest, $root.google.cloud.deploy.v1.ApproveRolloutResponse, request, callback); + }, "name", { value: "ApproveRollout" }); + + /** + * Calls ApproveRollout. + * @function approveRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} request ApproveRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|advanceRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef AdvanceRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.AdvanceRolloutResponse} [response] AdvanceRolloutResponse + */ + + /** + * Calls AdvanceRollout. + * @function advanceRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} request AdvanceRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.AdvanceRolloutCallback} callback Node-style callback called with the error, if any, and AdvanceRolloutResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.advanceRollout = function advanceRollout(request, callback) { + return this.rpcCall(advanceRollout, $root.google.cloud.deploy.v1.AdvanceRolloutRequest, $root.google.cloud.deploy.v1.AdvanceRolloutResponse, request, callback); + }, "name", { value: "AdvanceRollout" }); + + /** + * Calls AdvanceRollout. + * @function advanceRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} request AdvanceRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|cancelRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CancelRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.CancelRolloutResponse} [response] CancelRolloutResponse + */ + + /** + * Calls CancelRollout. + * @function cancelRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICancelRolloutRequest} request CancelRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CancelRolloutCallback} callback Node-style callback called with the error, if any, and CancelRolloutResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.cancelRollout = function cancelRollout(request, callback) { + return this.rpcCall(cancelRollout, $root.google.cloud.deploy.v1.CancelRolloutRequest, $root.google.cloud.deploy.v1.CancelRolloutResponse, request, callback); + }, "name", { value: "CancelRollout" }); + + /** + * Calls CancelRollout. + * @function cancelRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICancelRolloutRequest} request CancelRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listRollouts}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListRolloutsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListRolloutsResponse} [response] ListRolloutsResponse + */ + + /** + * Calls ListRollouts. + * @function listRollouts + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListRolloutsRequest} request ListRolloutsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListRolloutsCallback} callback Node-style callback called with the error, if any, and ListRolloutsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listRollouts = function listRollouts(request, callback) { + return this.rpcCall(listRollouts, $root.google.cloud.deploy.v1.ListRolloutsRequest, $root.google.cloud.deploy.v1.ListRolloutsResponse, request, callback); + }, "name", { value: "ListRollouts" }); + + /** + * Calls ListRollouts. + * @function listRollouts + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListRolloutsRequest} request ListRolloutsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Rollout} [response] Rollout + */ + + /** + * Calls GetRollout. + * @function getRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetRolloutRequest} request GetRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetRolloutCallback} callback Node-style callback called with the error, if any, and Rollout + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.getRollout = function getRollout(request, callback) { + return this.rpcCall(getRollout, $root.google.cloud.deploy.v1.GetRolloutRequest, $root.google.cloud.deploy.v1.Rollout, request, callback); + }, "name", { value: "GetRollout" }); + + /** + * Calls GetRollout. + * @function getRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetRolloutRequest} request GetRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createRollout}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateRolloutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateRollout. + * @function createRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} request CreateRolloutRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateRolloutCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createRollout = function createRollout(request, callback) { + return this.rpcCall(createRollout, $root.google.cloud.deploy.v1.CreateRolloutRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateRollout" }); + + /** + * Calls CreateRollout. + * @function createRollout + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} request CreateRolloutRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|ignoreJob}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef IgnoreJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.IgnoreJobResponse} [response] IgnoreJobResponse + */ + + /** + * Calls IgnoreJob. + * @function ignoreJob + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IIgnoreJobRequest} request IgnoreJobRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.IgnoreJobCallback} callback Node-style callback called with the error, if any, and IgnoreJobResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.ignoreJob = function ignoreJob(request, callback) { + return this.rpcCall(ignoreJob, $root.google.cloud.deploy.v1.IgnoreJobRequest, $root.google.cloud.deploy.v1.IgnoreJobResponse, request, callback); + }, "name", { value: "IgnoreJob" }); + + /** + * Calls IgnoreJob. + * @function ignoreJob + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IIgnoreJobRequest} request IgnoreJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|retryJob}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef RetryJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.RetryJobResponse} [response] RetryJobResponse + */ + + /** + * Calls RetryJob. + * @function retryJob * @memberof google.cloud.deploy.v1.CloudDeploy * @instance * @param {google.cloud.deploy.v1.IRetryJobRequest} request RetryJobRequest message or plain object @@ -956,150 +1728,414 @@ * @variation 2 */ - return CloudDeploy; - })(); + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|createAutomation}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CreateAutomationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1.DeliveryPipeline = (function() { + /** + * Calls CreateAutomation. + * @function createAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateAutomationRequest} request CreateAutomationRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CreateAutomationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.createAutomation = function createAutomation(request, callback) { + return this.rpcCall(createAutomation, $root.google.cloud.deploy.v1.CreateAutomationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAutomation" }); /** - * Properties of a DeliveryPipeline. - * @memberof google.cloud.deploy.v1 - * @interface IDeliveryPipeline - * @property {string|null} [name] DeliveryPipeline name - * @property {string|null} [uid] DeliveryPipeline uid - * @property {string|null} [description] DeliveryPipeline description - * @property {Object.|null} [annotations] DeliveryPipeline annotations - * @property {Object.|null} [labels] DeliveryPipeline labels - * @property {google.protobuf.ITimestamp|null} [createTime] DeliveryPipeline createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DeliveryPipeline updateTime - * @property {google.cloud.deploy.v1.ISerialPipeline|null} [serialPipeline] DeliveryPipeline serialPipeline - * @property {google.cloud.deploy.v1.IPipelineCondition|null} [condition] DeliveryPipeline condition - * @property {string|null} [etag] DeliveryPipeline etag - * @property {boolean|null} [suspended] DeliveryPipeline suspended + * Calls CreateAutomation. + * @function createAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICreateAutomationRequest} request CreateAutomationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new DeliveryPipeline. - * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeliveryPipeline. - * @implements IDeliveryPipeline - * @constructor - * @param {google.cloud.deploy.v1.IDeliveryPipeline=} [properties] Properties to set + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|updateAutomation}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef UpdateAutomationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - function DeliveryPipeline(properties) { - this.annotations = {}; - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * DeliveryPipeline name. - * @member {string} name - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls UpdateAutomation. + * @function updateAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IUpdateAutomationRequest} request UpdateAutomationRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.UpdateAutomationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DeliveryPipeline.prototype.name = ""; + Object.defineProperty(CloudDeploy.prototype.updateAutomation = function updateAutomation(request, callback) { + return this.rpcCall(updateAutomation, $root.google.cloud.deploy.v1.UpdateAutomationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAutomation" }); /** - * DeliveryPipeline uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls UpdateAutomation. + * @function updateAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IUpdateAutomationRequest} request UpdateAutomationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeliveryPipeline.prototype.uid = ""; /** - * DeliveryPipeline description. - * @member {string} description - * @memberof google.cloud.deploy.v1.DeliveryPipeline - * @instance + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|deleteAutomation}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef DeleteAutomationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - DeliveryPipeline.prototype.description = ""; /** - * DeliveryPipeline annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls DeleteAutomation. + * @function deleteAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IDeleteAutomationRequest} request DeleteAutomationRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.DeleteAutomationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DeliveryPipeline.prototype.annotations = $util.emptyObject; + Object.defineProperty(CloudDeploy.prototype.deleteAutomation = function deleteAutomation(request, callback) { + return this.rpcCall(deleteAutomation, $root.google.cloud.deploy.v1.DeleteAutomationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAutomation" }); /** - * DeliveryPipeline labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls DeleteAutomation. + * @function deleteAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IDeleteAutomationRequest} request DeleteAutomationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeliveryPipeline.prototype.labels = $util.emptyObject; /** - * DeliveryPipeline createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.DeliveryPipeline - * @instance + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getAutomation}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetAutomationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.Automation} [response] Automation */ - DeliveryPipeline.prototype.createTime = null; /** - * DeliveryPipeline updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls GetAutomation. + * @function getAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IGetAutomationRequest} request GetAutomationRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetAutomationCallback} callback Node-style callback called with the error, if any, and Automation + * @returns {undefined} + * @variation 1 */ - DeliveryPipeline.prototype.updateTime = null; + Object.defineProperty(CloudDeploy.prototype.getAutomation = function getAutomation(request, callback) { + return this.rpcCall(getAutomation, $root.google.cloud.deploy.v1.GetAutomationRequest, $root.google.cloud.deploy.v1.Automation, request, callback); + }, "name", { value: "GetAutomation" }); /** - * DeliveryPipeline serialPipeline. - * @member {google.cloud.deploy.v1.ISerialPipeline|null|undefined} serialPipeline - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls GetAutomation. + * @function getAutomation + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IGetAutomationRequest} request GetAutomationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeliveryPipeline.prototype.serialPipeline = null; /** - * DeliveryPipeline condition. - * @member {google.cloud.deploy.v1.IPipelineCondition|null|undefined} condition - * @memberof google.cloud.deploy.v1.DeliveryPipeline - * @instance + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listAutomations}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListAutomationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListAutomationsResponse} [response] ListAutomationsResponse */ - DeliveryPipeline.prototype.condition = null; /** - * DeliveryPipeline etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls ListAutomations. + * @function listAutomations + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IListAutomationsRequest} request ListAutomationsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListAutomationsCallback} callback Node-style callback called with the error, if any, and ListAutomationsResponse + * @returns {undefined} + * @variation 1 */ - DeliveryPipeline.prototype.etag = ""; + Object.defineProperty(CloudDeploy.prototype.listAutomations = function listAutomations(request, callback) { + return this.rpcCall(listAutomations, $root.google.cloud.deploy.v1.ListAutomationsRequest, $root.google.cloud.deploy.v1.ListAutomationsResponse, request, callback); + }, "name", { value: "ListAutomations" }); /** - * DeliveryPipeline suspended. - * @member {boolean} suspended - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls ListAutomations. + * @function listAutomations + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IListAutomationsRequest} request ListAutomationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DeliveryPipeline.prototype.suspended = false; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|getAutomationRun}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef GetAutomationRunCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.AutomationRun} [response] AutomationRun + */ /** - * DeliveryPipeline pipeline. - * @member {"serialPipeline"|undefined} pipeline - * @memberof google.cloud.deploy.v1.DeliveryPipeline + * Calls GetAutomationRun. + * @function getAutomationRun + * @memberof google.cloud.deploy.v1.CloudDeploy * @instance + * @param {google.cloud.deploy.v1.IGetAutomationRunRequest} request GetAutomationRunRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.GetAutomationRunCallback} callback Node-style callback called with the error, if any, and AutomationRun + * @returns {undefined} + * @variation 1 */ - Object.defineProperty(DeliveryPipeline.prototype, "pipeline", { - get: $util.oneOfGetter($oneOfFields = ["serialPipeline"]), - set: $util.oneOfSetter($oneOfFields) - }); + Object.defineProperty(CloudDeploy.prototype.getAutomationRun = function getAutomationRun(request, callback) { + return this.rpcCall(getAutomationRun, $root.google.cloud.deploy.v1.GetAutomationRunRequest, $root.google.cloud.deploy.v1.AutomationRun, request, callback); + }, "name", { value: "GetAutomationRun" }); /** - * Creates a new DeliveryPipeline instance using the specified properties. - * @function create + * Calls GetAutomationRun. + * @function getAutomationRun + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IGetAutomationRunRequest} request GetAutomationRunRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|listAutomationRuns}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef ListAutomationRunsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.ListAutomationRunsResponse} [response] ListAutomationRunsResponse + */ + + /** + * Calls ListAutomationRuns. + * @function listAutomationRuns + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListAutomationRunsRequest} request ListAutomationRunsRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.ListAutomationRunsCallback} callback Node-style callback called with the error, if any, and ListAutomationRunsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.listAutomationRuns = function listAutomationRuns(request, callback) { + return this.rpcCall(listAutomationRuns, $root.google.cloud.deploy.v1.ListAutomationRunsRequest, $root.google.cloud.deploy.v1.ListAutomationRunsResponse, request, callback); + }, "name", { value: "ListAutomationRuns" }); + + /** + * Calls ListAutomationRuns. + * @function listAutomationRuns + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.IListAutomationRunsRequest} request ListAutomationRunsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.deploy.v1.CloudDeploy|cancelAutomationRun}. + * @memberof google.cloud.deploy.v1.CloudDeploy + * @typedef CancelAutomationRunCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.deploy.v1.CancelAutomationRunResponse} [response] CancelAutomationRunResponse + */ + + /** + * Calls CancelAutomationRun. + * @function cancelAutomationRun + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICancelAutomationRunRequest} request CancelAutomationRunRequest message or plain object + * @param {google.cloud.deploy.v1.CloudDeploy.CancelAutomationRunCallback} callback Node-style callback called with the error, if any, and CancelAutomationRunResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudDeploy.prototype.cancelAutomationRun = function cancelAutomationRun(request, callback) { + return this.rpcCall(cancelAutomationRun, $root.google.cloud.deploy.v1.CancelAutomationRunRequest, $root.google.cloud.deploy.v1.CancelAutomationRunResponse, request, callback); + }, "name", { value: "CancelAutomationRun" }); + + /** + * Calls CancelAutomationRun. + * @function cancelAutomationRun + * @memberof google.cloud.deploy.v1.CloudDeploy + * @instance + * @param {google.cloud.deploy.v1.ICancelAutomationRunRequest} request CancelAutomationRunRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CloudDeploy; + })(); + + v1.DeliveryPipeline = (function() { + + /** + * Properties of a DeliveryPipeline. + * @memberof google.cloud.deploy.v1 + * @interface IDeliveryPipeline + * @property {string|null} [name] DeliveryPipeline name + * @property {string|null} [uid] DeliveryPipeline uid + * @property {string|null} [description] DeliveryPipeline description + * @property {Object.|null} [annotations] DeliveryPipeline annotations + * @property {Object.|null} [labels] DeliveryPipeline labels + * @property {google.protobuf.ITimestamp|null} [createTime] DeliveryPipeline createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DeliveryPipeline updateTime + * @property {google.cloud.deploy.v1.ISerialPipeline|null} [serialPipeline] DeliveryPipeline serialPipeline + * @property {google.cloud.deploy.v1.IPipelineCondition|null} [condition] DeliveryPipeline condition + * @property {string|null} [etag] DeliveryPipeline etag + * @property {boolean|null} [suspended] DeliveryPipeline suspended + */ + + /** + * Constructs a new DeliveryPipeline. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeliveryPipeline. + * @implements IDeliveryPipeline + * @constructor + * @param {google.cloud.deploy.v1.IDeliveryPipeline=} [properties] Properties to set + */ + function DeliveryPipeline(properties) { + this.annotations = {}; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliveryPipeline name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.name = ""; + + /** + * DeliveryPipeline uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.uid = ""; + + /** + * DeliveryPipeline description. + * @member {string} description + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.description = ""; + + /** + * DeliveryPipeline annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.annotations = $util.emptyObject; + + /** + * DeliveryPipeline labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.labels = $util.emptyObject; + + /** + * DeliveryPipeline createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.createTime = null; + + /** + * DeliveryPipeline updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.updateTime = null; + + /** + * DeliveryPipeline serialPipeline. + * @member {google.cloud.deploy.v1.ISerialPipeline|null|undefined} serialPipeline + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.serialPipeline = null; + + /** + * DeliveryPipeline condition. + * @member {google.cloud.deploy.v1.IPipelineCondition|null|undefined} condition + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.condition = null; + + /** + * DeliveryPipeline etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.etag = ""; + + /** + * DeliveryPipeline suspended. + * @member {boolean} suspended + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + DeliveryPipeline.prototype.suspended = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeliveryPipeline pipeline. + * @member {"serialPipeline"|undefined} pipeline + * @memberof google.cloud.deploy.v1.DeliveryPipeline + * @instance + */ + Object.defineProperty(DeliveryPipeline.prototype, "pipeline", { + get: $util.oneOfGetter($oneOfFields = ["serialPipeline"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeliveryPipeline instance using the specified properties. + * @function create * @memberof google.cloud.deploy.v1.DeliveryPipeline * @static * @param {google.cloud.deploy.v1.IDeliveryPipeline=} [properties] Properties to set @@ -8434,43 +9470,25 @@ return DeleteDeliveryPipelineRequest; })(); - v1.Target = (function() { + v1.RollbackTargetConfig = (function() { /** - * Properties of a Target. + * Properties of a RollbackTargetConfig. * @memberof google.cloud.deploy.v1 - * @interface ITarget - * @property {string|null} [name] Target name - * @property {string|null} [targetId] Target targetId - * @property {string|null} [uid] Target uid - * @property {string|null} [description] Target description - * @property {Object.|null} [annotations] Target annotations - * @property {Object.|null} [labels] Target labels - * @property {boolean|null} [requireApproval] Target requireApproval - * @property {google.protobuf.ITimestamp|null} [createTime] Target createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Target updateTime - * @property {google.cloud.deploy.v1.IGkeCluster|null} [gke] Target gke - * @property {google.cloud.deploy.v1.IAnthosCluster|null} [anthosCluster] Target anthosCluster - * @property {google.cloud.deploy.v1.ICloudRunLocation|null} [run] Target run - * @property {google.cloud.deploy.v1.IMultiTarget|null} [multiTarget] Target multiTarget - * @property {string|null} [etag] Target etag - * @property {Array.|null} [executionConfigs] Target executionConfigs - * @property {Object.|null} [deployParameters] Target deployParameters + * @interface IRollbackTargetConfig + * @property {google.cloud.deploy.v1.IRollout|null} [rollout] RollbackTargetConfig rollout + * @property {string|null} [startingPhaseId] RollbackTargetConfig startingPhaseId */ /** - * Constructs a new Target. + * Constructs a new RollbackTargetConfig. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Target. - * @implements ITarget + * @classdesc Represents a RollbackTargetConfig. + * @implements IRollbackTargetConfig * @constructor - * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRollbackTargetConfig=} [properties] Properties to set */ - function Target(properties) { - this.annotations = {}; - this.labels = {}; - this.executionConfigs = []; - this.deployParameters = {}; + function RollbackTargetConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8478,238 +9496,367 @@ } /** - * Target name. - * @member {string} name - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetConfig rollout. + * @member {google.cloud.deploy.v1.IRollout|null|undefined} rollout + * @memberof google.cloud.deploy.v1.RollbackTargetConfig * @instance */ - Target.prototype.name = ""; + RollbackTargetConfig.prototype.rollout = null; /** - * Target targetId. - * @member {string} targetId - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetConfig startingPhaseId. + * @member {string} startingPhaseId + * @memberof google.cloud.deploy.v1.RollbackTargetConfig * @instance */ - Target.prototype.targetId = ""; + RollbackTargetConfig.prototype.startingPhaseId = ""; /** - * Target uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.Target - * @instance + * Creates a new RollbackTargetConfig instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {google.cloud.deploy.v1.IRollbackTargetConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RollbackTargetConfig} RollbackTargetConfig instance */ - Target.prototype.uid = ""; + RollbackTargetConfig.create = function create(properties) { + return new RollbackTargetConfig(properties); + }; /** - * Target description. - * @member {string} description - * @memberof google.cloud.deploy.v1.Target - * @instance + * Encodes the specified RollbackTargetConfig message. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {google.cloud.deploy.v1.IRollbackTargetConfig} message RollbackTargetConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Target.prototype.description = ""; + RollbackTargetConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollout, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startingPhaseId != null && Object.hasOwnProperty.call(message, "startingPhaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.startingPhaseId); + return writer; + }; /** - * Target annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.Target - * @instance + * Encodes the specified RollbackTargetConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {google.cloud.deploy.v1.IRollbackTargetConfig} message RollbackTargetConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Target.prototype.annotations = $util.emptyObject; + RollbackTargetConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Target labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.Target - * @instance + * Decodes a RollbackTargetConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RollbackTargetConfig} RollbackTargetConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.prototype.labels = $util.emptyObject; + RollbackTargetConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RollbackTargetConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + break; + } + case 2: { + message.startingPhaseId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Target requireApproval. - * @member {boolean} requireApproval - * @memberof google.cloud.deploy.v1.Target - * @instance + * Decodes a RollbackTargetConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RollbackTargetConfig} RollbackTargetConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.prototype.requireApproval = false; + RollbackTargetConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Target createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.Target - * @instance + * Verifies a RollbackTargetConfig message. + * @function verify + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Target.prototype.createTime = null; + RollbackTargetConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.startingPhaseId != null && message.hasOwnProperty("startingPhaseId")) + if (!$util.isString(message.startingPhaseId)) + return "startingPhaseId: string expected"; + return null; + }; /** - * Target updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.deploy.v1.Target - * @instance + * Creates a RollbackTargetConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RollbackTargetConfig} RollbackTargetConfig */ - Target.prototype.updateTime = null; + RollbackTargetConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RollbackTargetConfig) + return object; + var message = new $root.google.cloud.deploy.v1.RollbackTargetConfig(); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.deploy.v1.RollbackTargetConfig.rollout: object expected"); + message.rollout = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollout); + } + if (object.startingPhaseId != null) + message.startingPhaseId = String(object.startingPhaseId); + return message; + }; /** - * Target gke. - * @member {google.cloud.deploy.v1.IGkeCluster|null|undefined} gke - * @memberof google.cloud.deploy.v1.Target - * @instance + * Creates a plain object from a RollbackTargetConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {google.cloud.deploy.v1.RollbackTargetConfig} message RollbackTargetConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Target.prototype.gke = null; + RollbackTargetConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rollout = null; + object.startingPhaseId = ""; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollout, options); + if (message.startingPhaseId != null && message.hasOwnProperty("startingPhaseId")) + object.startingPhaseId = message.startingPhaseId; + return object; + }; /** - * Target anthosCluster. - * @member {google.cloud.deploy.v1.IAnthosCluster|null|undefined} anthosCluster - * @memberof google.cloud.deploy.v1.Target + * Converts this RollbackTargetConfig to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RollbackTargetConfig * @instance + * @returns {Object.} JSON object */ - Target.prototype.anthosCluster = null; + RollbackTargetConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Target run. - * @member {google.cloud.deploy.v1.ICloudRunLocation|null|undefined} run - * @memberof google.cloud.deploy.v1.Target + * Gets the default type url for RollbackTargetConfig + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RollbackTargetConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackTargetConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RollbackTargetConfig"; + }; + + return RollbackTargetConfig; + })(); + + v1.RollbackTargetRequest = (function() { + + /** + * Properties of a RollbackTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IRollbackTargetRequest + * @property {string|null} [name] RollbackTargetRequest name + * @property {string|null} [targetId] RollbackTargetRequest targetId + * @property {string|null} [rolloutId] RollbackTargetRequest rolloutId + * @property {string|null} [releaseId] RollbackTargetRequest releaseId + * @property {string|null} [rolloutToRollBack] RollbackTargetRequest rolloutToRollBack + * @property {google.cloud.deploy.v1.IRollbackTargetConfig|null} [rollbackConfig] RollbackTargetRequest rollbackConfig + * @property {boolean|null} [validateOnly] RollbackTargetRequest validateOnly + */ + + /** + * Constructs a new RollbackTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RollbackTargetRequest. + * @implements IRollbackTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IRollbackTargetRequest=} [properties] Properties to set + */ + function RollbackTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RollbackTargetRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance */ - Target.prototype.run = null; + RollbackTargetRequest.prototype.name = ""; /** - * Target multiTarget. - * @member {google.cloud.deploy.v1.IMultiTarget|null|undefined} multiTarget - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetRequest targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance */ - Target.prototype.multiTarget = null; + RollbackTargetRequest.prototype.targetId = ""; /** - * Target etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetRequest rolloutId. + * @member {string} rolloutId + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance */ - Target.prototype.etag = ""; + RollbackTargetRequest.prototype.rolloutId = ""; /** - * Target executionConfigs. - * @member {Array.} executionConfigs - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetRequest releaseId. + * @member {string} releaseId + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance */ - Target.prototype.executionConfigs = $util.emptyArray; + RollbackTargetRequest.prototype.releaseId = ""; /** - * Target deployParameters. - * @member {Object.} deployParameters - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetRequest rolloutToRollBack. + * @member {string} rolloutToRollBack + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance */ - Target.prototype.deployParameters = $util.emptyObject; + RollbackTargetRequest.prototype.rolloutToRollBack = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * RollbackTargetRequest rollbackConfig. + * @member {google.cloud.deploy.v1.IRollbackTargetConfig|null|undefined} rollbackConfig + * @memberof google.cloud.deploy.v1.RollbackTargetRequest + * @instance + */ + RollbackTargetRequest.prototype.rollbackConfig = null; /** - * Target deploymentTarget. - * @member {"gke"|"anthosCluster"|"run"|"multiTarget"|undefined} deploymentTarget - * @memberof google.cloud.deploy.v1.Target + * RollbackTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance */ - Object.defineProperty(Target.prototype, "deploymentTarget", { - get: $util.oneOfGetter($oneOfFields = ["gke", "anthosCluster", "run", "multiTarget"]), - set: $util.oneOfSetter($oneOfFields) - }); + RollbackTargetRequest.prototype.validateOnly = false; /** - * Creates a new Target instance using the specified properties. + * Creates a new RollbackTargetRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static - * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Target} Target instance + * @param {google.cloud.deploy.v1.IRollbackTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RollbackTargetRequest} RollbackTargetRequest instance */ - Target.create = function create(properties) { - return new Target(properties); + RollbackTargetRequest.create = function create(properties) { + return new RollbackTargetRequest(properties); }; /** - * Encodes the specified Target message. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * Encodes the specified RollbackTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static - * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode + * @param {google.cloud.deploy.v1.IRollbackTargetRequest} message RollbackTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Target.encode = function encode(message, writer) { + RollbackTargetRequest.encode = function encode(message, writer) { 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.targetId != null && Object.hasOwnProperty.call(message, "targetId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - 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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); - if (message.requireApproval != null && Object.hasOwnProperty.call(message, "requireApproval")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requireApproval); - if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) - $root.google.cloud.deploy.v1.GkeCluster.encode(message.gke, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.executionConfigs != null && message.executionConfigs.length) - for (var i = 0; i < message.executionConfigs.length; ++i) - $root.google.cloud.deploy.v1.ExecutionConfig.encode(message.executionConfigs[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.anthosCluster != null && Object.hasOwnProperty.call(message, "anthosCluster")) - $root.google.cloud.deploy.v1.AnthosCluster.encode(message.anthosCluster, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.run != null && Object.hasOwnProperty.call(message, "run")) - $root.google.cloud.deploy.v1.CloudRunLocation.encode(message.run, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.multiTarget != null && Object.hasOwnProperty.call(message, "multiTarget")) - $root.google.cloud.deploy.v1.MultiTarget.encode(message.multiTarget, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.deployParameters != null && Object.hasOwnProperty.call(message, "deployParameters")) - for (var keys = Object.keys(message.deployParameters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.deployParameters[keys[i]]).ldelim(); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rolloutId); + if (message.releaseId != null && Object.hasOwnProperty.call(message, "releaseId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.releaseId); + if (message.rolloutToRollBack != null && Object.hasOwnProperty.call(message, "rolloutToRollBack")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.rolloutToRollBack); + if (message.rollbackConfig != null && Object.hasOwnProperty.call(message, "rollbackConfig")) + $root.google.cloud.deploy.v1.RollbackTargetConfig.encode(message.rollbackConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.validateOnly); return writer; }; /** - * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. + * Encodes the specified RollbackTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static - * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode + * @param {google.cloud.deploy.v1.IRollbackTargetRequest} message RollbackTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Target.encodeDelimited = function encodeDelimited(message, writer) { + RollbackTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Target message from the specified reader or buffer. + * Decodes a RollbackTargetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Target} Target + * @returns {google.cloud.deploy.v1.RollbackTargetRequest} RollbackTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.decode = function decode(reader, length) { + RollbackTargetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Target(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RollbackTargetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -8722,118 +9869,23 @@ break; } case 3: { - message.uid = reader.string(); + message.rolloutId = reader.string(); break; } case 4: { - message.description = reader.string(); + message.releaseId = reader.string(); break; } case 5: { - 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; + message.rolloutToRollBack = reader.string(); break; } case 6: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 13: { - message.requireApproval = reader.bool(); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 15: { - message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); - break; - } - case 17: { - message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); - break; - } - case 18: { - message.run = $root.google.cloud.deploy.v1.CloudRunLocation.decode(reader, reader.uint32()); - break; - } - case 19: { - message.multiTarget = $root.google.cloud.deploy.v1.MultiTarget.decode(reader, reader.uint32()); - break; - } - case 12: { - message.etag = reader.string(); - break; - } - case 16: { - if (!(message.executionConfigs && message.executionConfigs.length)) - message.executionConfigs = []; - message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); + message.rollbackConfig = $root.google.cloud.deploy.v1.RollbackTargetConfig.decode(reader, reader.uint32()); break; } - case 20: { - if (message.deployParameters === $util.emptyObject) - message.deployParameters = {}; - 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.deployParameters[key] = value; + case 7: { + message.validateOnly = reader.bool(); break; } default: @@ -8845,367 +9897,176 @@ }; /** - * Decodes a Target message from the specified reader or buffer, length delimited. + * Decodes a RollbackTargetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Target} Target + * @returns {google.cloud.deploy.v1.RollbackTargetRequest} RollbackTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Target.decodeDelimited = function decodeDelimited(reader) { + RollbackTargetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Target message. + * Verifies a RollbackTargetRequest message. * @function verify - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Target.verify = function verify(message) { + RollbackTargetRequest.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.targetId != null && message.hasOwnProperty("targetId")) if (!$util.isString(message.targetId)) return "targetId: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: 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.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) - if (typeof message.requireApproval !== "boolean") - return "requireApproval: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: string expected"; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + if (!$util.isString(message.releaseId)) + return "releaseId: string expected"; + if (message.rolloutToRollBack != null && message.hasOwnProperty("rolloutToRollBack")) + if (!$util.isString(message.rolloutToRollBack)) + return "rolloutToRollBack: string expected"; + if (message.rollbackConfig != null && message.hasOwnProperty("rollbackConfig")) { + var error = $root.google.cloud.deploy.v1.RollbackTargetConfig.verify(message.rollbackConfig); if (error) - return "updateTime." + error; - } - if (message.gke != null && message.hasOwnProperty("gke")) { - properties.deploymentTarget = 1; - { - var error = $root.google.cloud.deploy.v1.GkeCluster.verify(message.gke); - if (error) - return "gke." + error; - } - } - if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { - if (properties.deploymentTarget === 1) - return "deploymentTarget: multiple values"; - properties.deploymentTarget = 1; - { - var error = $root.google.cloud.deploy.v1.AnthosCluster.verify(message.anthosCluster); - if (error) - return "anthosCluster." + error; - } - } - if (message.run != null && message.hasOwnProperty("run")) { - if (properties.deploymentTarget === 1) - return "deploymentTarget: multiple values"; - properties.deploymentTarget = 1; - { - var error = $root.google.cloud.deploy.v1.CloudRunLocation.verify(message.run); - if (error) - return "run." + error; - } - } - if (message.multiTarget != null && message.hasOwnProperty("multiTarget")) { - if (properties.deploymentTarget === 1) - return "deploymentTarget: multiple values"; - properties.deploymentTarget = 1; - { - var error = $root.google.cloud.deploy.v1.MultiTarget.verify(message.multiTarget); - if (error) - return "multiTarget." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.executionConfigs != null && message.hasOwnProperty("executionConfigs")) { - if (!Array.isArray(message.executionConfigs)) - return "executionConfigs: array expected"; - for (var i = 0; i < message.executionConfigs.length; ++i) { - var error = $root.google.cloud.deploy.v1.ExecutionConfig.verify(message.executionConfigs[i]); - if (error) - return "executionConfigs." + error; - } - } - if (message.deployParameters != null && message.hasOwnProperty("deployParameters")) { - if (!$util.isObject(message.deployParameters)) - return "deployParameters: object expected"; - var key = Object.keys(message.deployParameters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.deployParameters[key[i]])) - return "deployParameters: string{k:string} expected"; + return "rollbackConfig." + error; } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a Target message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackTargetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Target} Target + * @returns {google.cloud.deploy.v1.RollbackTargetRequest} RollbackTargetRequest */ - Target.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Target) + RollbackTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RollbackTargetRequest) return object; - var message = new $root.google.cloud.deploy.v1.Target(); + var message = new $root.google.cloud.deploy.v1.RollbackTargetRequest(); if (object.name != null) message.name = String(object.name); if (object.targetId != null) message.targetId = String(object.targetId); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.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.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.requireApproval != null) - message.requireApproval = Boolean(object.requireApproval); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.gke != null) { - if (typeof object.gke !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.gke: object expected"); - message.gke = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gke); - } - if (object.anthosCluster != null) { - if (typeof object.anthosCluster !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.anthosCluster: object expected"); - message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.fromObject(object.anthosCluster); - } - if (object.run != null) { - if (typeof object.run !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.run: object expected"); - message.run = $root.google.cloud.deploy.v1.CloudRunLocation.fromObject(object.run); - } - if (object.multiTarget != null) { - if (typeof object.multiTarget !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.multiTarget: object expected"); - message.multiTarget = $root.google.cloud.deploy.v1.MultiTarget.fromObject(object.multiTarget); - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.executionConfigs) { - if (!Array.isArray(object.executionConfigs)) - throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: array expected"); - message.executionConfigs = []; - for (var i = 0; i < object.executionConfigs.length; ++i) { - if (typeof object.executionConfigs[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: object expected"); - message.executionConfigs[i] = $root.google.cloud.deploy.v1.ExecutionConfig.fromObject(object.executionConfigs[i]); - } - } - if (object.deployParameters) { - if (typeof object.deployParameters !== "object") - throw TypeError(".google.cloud.deploy.v1.Target.deployParameters: object expected"); - message.deployParameters = {}; - for (var keys = Object.keys(object.deployParameters), i = 0; i < keys.length; ++i) - message.deployParameters[keys[i]] = String(object.deployParameters[keys[i]]); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + if (object.releaseId != null) + message.releaseId = String(object.releaseId); + if (object.rolloutToRollBack != null) + message.rolloutToRollBack = String(object.rolloutToRollBack); + if (object.rollbackConfig != null) { + if (typeof object.rollbackConfig !== "object") + throw TypeError(".google.cloud.deploy.v1.RollbackTargetRequest.rollbackConfig: object expected"); + message.rollbackConfig = $root.google.cloud.deploy.v1.RollbackTargetConfig.fromObject(object.rollbackConfig); } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a Target message. Also converts values to other types if specified. + * Creates a plain object from a RollbackTargetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static - * @param {google.cloud.deploy.v1.Target} message Target + * @param {google.cloud.deploy.v1.RollbackTargetRequest} message RollbackTargetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Target.toObject = function toObject(message, options) { + RollbackTargetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.executionConfigs = []; - if (options.objects || options.defaults) { - object.annotations = {}; - object.labels = {}; - object.deployParameters = {}; - } if (options.defaults) { object.name = ""; object.targetId = ""; - object.uid = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.etag = ""; - object.requireApproval = false; + object.rolloutId = ""; + object.releaseId = ""; + object.rolloutToRollBack = ""; + object.rollbackConfig = null; + object.validateOnly = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.targetId != null && message.hasOwnProperty("targetId")) object.targetId = message.targetId; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) - object.requireApproval = message.requireApproval; - if (message.gke != null && message.hasOwnProperty("gke")) { - object.gke = $root.google.cloud.deploy.v1.GkeCluster.toObject(message.gke, options); - if (options.oneofs) - object.deploymentTarget = "gke"; - } - if (message.executionConfigs && message.executionConfigs.length) { - object.executionConfigs = []; - for (var j = 0; j < message.executionConfigs.length; ++j) - object.executionConfigs[j] = $root.google.cloud.deploy.v1.ExecutionConfig.toObject(message.executionConfigs[j], options); - } - if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { - object.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.toObject(message.anthosCluster, options); - if (options.oneofs) - object.deploymentTarget = "anthosCluster"; - } - if (message.run != null && message.hasOwnProperty("run")) { - object.run = $root.google.cloud.deploy.v1.CloudRunLocation.toObject(message.run, options); - if (options.oneofs) - object.deploymentTarget = "run"; - } - if (message.multiTarget != null && message.hasOwnProperty("multiTarget")) { - object.multiTarget = $root.google.cloud.deploy.v1.MultiTarget.toObject(message.multiTarget, options); - if (options.oneofs) - object.deploymentTarget = "multiTarget"; - } - if (message.deployParameters && (keys2 = Object.keys(message.deployParameters)).length) { - object.deployParameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.deployParameters[keys2[j]] = message.deployParameters[keys2[j]]; - } + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + object.releaseId = message.releaseId; + if (message.rolloutToRollBack != null && message.hasOwnProperty("rolloutToRollBack")) + object.rolloutToRollBack = message.rolloutToRollBack; + if (message.rollbackConfig != null && message.hasOwnProperty("rollbackConfig")) + object.rollbackConfig = $root.google.cloud.deploy.v1.RollbackTargetConfig.toObject(message.rollbackConfig, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this Target to JSON. + * Converts this RollbackTargetRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @instance * @returns {Object.} JSON object */ - Target.prototype.toJSON = function toJSON() { + RollbackTargetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Target + * Gets the default type url for RollbackTargetRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Target + * @memberof google.cloud.deploy.v1.RollbackTargetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RollbackTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Target"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RollbackTargetRequest"; }; - return Target; + return RollbackTargetRequest; })(); - v1.ExecutionConfig = (function() { + v1.RollbackTargetResponse = (function() { /** - * Properties of an ExecutionConfig. + * Properties of a RollbackTargetResponse. * @memberof google.cloud.deploy.v1 - * @interface IExecutionConfig - * @property {Array.|null} [usages] ExecutionConfig usages - * @property {google.cloud.deploy.v1.IDefaultPool|null} [defaultPool] ExecutionConfig defaultPool - * @property {google.cloud.deploy.v1.IPrivatePool|null} [privatePool] ExecutionConfig privatePool - * @property {string|null} [workerPool] ExecutionConfig workerPool - * @property {string|null} [serviceAccount] ExecutionConfig serviceAccount - * @property {string|null} [artifactStorage] ExecutionConfig artifactStorage - * @property {google.protobuf.IDuration|null} [executionTimeout] ExecutionConfig executionTimeout + * @interface IRollbackTargetResponse + * @property {google.cloud.deploy.v1.IRollbackTargetConfig|null} [rollbackConfig] RollbackTargetResponse rollbackConfig */ /** - * Constructs a new ExecutionConfig. + * Constructs a new RollbackTargetResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an ExecutionConfig. - * @implements IExecutionConfig + * @classdesc Represents a RollbackTargetResponse. + * @implements IRollbackTargetResponse * @constructor - * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRollbackTargetResponse=} [properties] Properties to set */ - function ExecutionConfig(properties) { - this.usages = []; + function RollbackTargetResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9213,184 +10074,75 @@ } /** - * ExecutionConfig usages. - * @member {Array.} usages - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.usages = $util.emptyArray; - - /** - * ExecutionConfig defaultPool. - * @member {google.cloud.deploy.v1.IDefaultPool|null|undefined} defaultPool - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.defaultPool = null; - - /** - * ExecutionConfig privatePool. - * @member {google.cloud.deploy.v1.IPrivatePool|null|undefined} privatePool - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.privatePool = null; - - /** - * ExecutionConfig workerPool. - * @member {string} workerPool - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.workerPool = ""; - - /** - * ExecutionConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.serviceAccount = ""; - - /** - * ExecutionConfig artifactStorage. - * @member {string} artifactStorage - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.artifactStorage = ""; - - /** - * ExecutionConfig executionTimeout. - * @member {google.protobuf.IDuration|null|undefined} executionTimeout - * @memberof google.cloud.deploy.v1.ExecutionConfig - * @instance - */ - ExecutionConfig.prototype.executionTimeout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExecutionConfig executionEnvironment. - * @member {"defaultPool"|"privatePool"|undefined} executionEnvironment - * @memberof google.cloud.deploy.v1.ExecutionConfig + * RollbackTargetResponse rollbackConfig. + * @member {google.cloud.deploy.v1.IRollbackTargetConfig|null|undefined} rollbackConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @instance */ - Object.defineProperty(ExecutionConfig.prototype, "executionEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["defaultPool", "privatePool"]), - set: $util.oneOfSetter($oneOfFields) - }); + RollbackTargetResponse.prototype.rollbackConfig = null; /** - * Creates a new ExecutionConfig instance using the specified properties. + * Creates a new RollbackTargetResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static - * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig instance + * @param {google.cloud.deploy.v1.IRollbackTargetResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RollbackTargetResponse} RollbackTargetResponse instance */ - ExecutionConfig.create = function create(properties) { - return new ExecutionConfig(properties); + RollbackTargetResponse.create = function create(properties) { + return new RollbackTargetResponse(properties); }; /** - * Encodes the specified ExecutionConfig message. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * Encodes the specified RollbackTargetResponse message. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static - * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode + * @param {google.cloud.deploy.v1.IRollbackTargetResponse} message RollbackTargetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionConfig.encode = function encode(message, writer) { + RollbackTargetResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.usages != null && message.usages.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.usages.length; ++i) - writer.int32(message.usages[i]); - writer.ldelim(); - } - if (message.defaultPool != null && Object.hasOwnProperty.call(message, "defaultPool")) - $root.google.cloud.deploy.v1.DefaultPool.encode(message.defaultPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.privatePool != null && Object.hasOwnProperty.call(message, "privatePool")) - $root.google.cloud.deploy.v1.PrivatePool.encode(message.privatePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.workerPool); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); - if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.artifactStorage); - if (message.executionTimeout != null && Object.hasOwnProperty.call(message, "executionTimeout")) - $root.google.protobuf.Duration.encode(message.executionTimeout, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.rollbackConfig != null && Object.hasOwnProperty.call(message, "rollbackConfig")) + $root.google.cloud.deploy.v1.RollbackTargetConfig.encode(message.rollbackConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExecutionConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. + * Encodes the specified RollbackTargetResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackTargetResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static - * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode + * @param {google.cloud.deploy.v1.IRollbackTargetResponse} message RollbackTargetResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionConfig.encodeDelimited = function encodeDelimited(message, writer) { + RollbackTargetResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecutionConfig message from the specified reader or buffer. + * Decodes a RollbackTargetResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @returns {google.cloud.deploy.v1.RollbackTargetResponse} RollbackTargetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionConfig.decode = function decode(reader, length) { + RollbackTargetResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ExecutionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RollbackTargetResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.usages && message.usages.length)) - message.usages = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.usages.push(reader.int32()); - } else - message.usages.push(reader.int32()); - break; - } - case 2: { - message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); - break; - } - case 3: { - message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); - break; - } - case 4: { - message.workerPool = reader.string(); - break; - } - case 5: { - message.serviceAccount = reader.string(); - break; - } - case 6: { - message.artifactStorage = reader.string(); - break; - } - case 7: { - message.executionTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.rollbackConfig = $root.google.cloud.deploy.v1.RollbackTargetConfig.decode(reader, reader.uint32()); break; } default: @@ -9402,274 +10154,146 @@ }; /** - * Decodes an ExecutionConfig message from the specified reader or buffer, length delimited. + * Decodes a RollbackTargetResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @returns {google.cloud.deploy.v1.RollbackTargetResponse} RollbackTargetResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionConfig.decodeDelimited = function decodeDelimited(reader) { + RollbackTargetResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecutionConfig message. + * Verifies a RollbackTargetResponse message. * @function verify - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecutionConfig.verify = function verify(message) { + RollbackTargetResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.usages != null && message.hasOwnProperty("usages")) { - if (!Array.isArray(message.usages)) - return "usages: array expected"; - for (var i = 0; i < message.usages.length; ++i) - switch (message.usages[i]) { - default: - return "usages: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { - properties.executionEnvironment = 1; - { - var error = $root.google.cloud.deploy.v1.DefaultPool.verify(message.defaultPool); - if (error) - return "defaultPool." + error; - } - } - if (message.privatePool != null && message.hasOwnProperty("privatePool")) { - if (properties.executionEnvironment === 1) - return "executionEnvironment: multiple values"; - properties.executionEnvironment = 1; - { - var error = $root.google.cloud.deploy.v1.PrivatePool.verify(message.privatePool); - if (error) - return "privatePool." + error; - } - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - if (!$util.isString(message.artifactStorage)) - return "artifactStorage: string expected"; - if (message.executionTimeout != null && message.hasOwnProperty("executionTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.executionTimeout); + if (message.rollbackConfig != null && message.hasOwnProperty("rollbackConfig")) { + var error = $root.google.cloud.deploy.v1.RollbackTargetConfig.verify(message.rollbackConfig); if (error) - return "executionTimeout." + error; + return "rollbackConfig." + error; } return null; }; /** - * Creates an ExecutionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackTargetResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig + * @returns {google.cloud.deploy.v1.RollbackTargetResponse} RollbackTargetResponse */ - ExecutionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ExecutionConfig) + RollbackTargetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RollbackTargetResponse) return object; - var message = new $root.google.cloud.deploy.v1.ExecutionConfig(); - if (object.usages) { - if (!Array.isArray(object.usages)) - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.usages: array expected"); - message.usages = []; - for (var i = 0; i < object.usages.length; ++i) - switch (object.usages[i]) { - default: - if (typeof object.usages[i] === "number") { - message.usages[i] = object.usages[i]; - break; - } - case "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": - case 0: - message.usages[i] = 0; - break; - case "RENDER": - case 1: - message.usages[i] = 1; - break; - case "DEPLOY": - case 2: - message.usages[i] = 2; - break; - case "VERIFY": - case 3: - message.usages[i] = 3; - break; - case "PREDEPLOY": - case 4: - message.usages[i] = 4; - break; - case "POSTDEPLOY": - case 5: - message.usages[i] = 5; - break; - } - } - if (object.defaultPool != null) { - if (typeof object.defaultPool !== "object") - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.defaultPool: object expected"); - message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.fromObject(object.defaultPool); - } - if (object.privatePool != null) { - if (typeof object.privatePool !== "object") - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.privatePool: object expected"); - message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.fromObject(object.privatePool); - } - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactStorage != null) - message.artifactStorage = String(object.artifactStorage); - if (object.executionTimeout != null) { - if (typeof object.executionTimeout !== "object") - throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.executionTimeout: object expected"); - message.executionTimeout = $root.google.protobuf.Duration.fromObject(object.executionTimeout); + var message = new $root.google.cloud.deploy.v1.RollbackTargetResponse(); + if (object.rollbackConfig != null) { + if (typeof object.rollbackConfig !== "object") + throw TypeError(".google.cloud.deploy.v1.RollbackTargetResponse.rollbackConfig: object expected"); + message.rollbackConfig = $root.google.cloud.deploy.v1.RollbackTargetConfig.fromObject(object.rollbackConfig); } return message; }; /** - * Creates a plain object from an ExecutionConfig message. Also converts values to other types if specified. + * Creates a plain object from a RollbackTargetResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static - * @param {google.cloud.deploy.v1.ExecutionConfig} message ExecutionConfig + * @param {google.cloud.deploy.v1.RollbackTargetResponse} message RollbackTargetResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecutionConfig.toObject = function toObject(message, options) { + RollbackTargetResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.usages = []; - if (options.defaults) { - object.workerPool = ""; - object.serviceAccount = ""; - object.artifactStorage = ""; - object.executionTimeout = null; - } - if (message.usages && message.usages.length) { - object.usages = []; - for (var j = 0; j < message.usages.length; ++j) - object.usages[j] = options.enums === String ? $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] === undefined ? message.usages[j] : $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] : message.usages[j]; - } - if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { - object.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.toObject(message.defaultPool, options); - if (options.oneofs) - object.executionEnvironment = "defaultPool"; - } - if (message.privatePool != null && message.hasOwnProperty("privatePool")) { - object.privatePool = $root.google.cloud.deploy.v1.PrivatePool.toObject(message.privatePool, options); - if (options.oneofs) - object.executionEnvironment = "privatePool"; - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = message.workerPool; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - object.artifactStorage = message.artifactStorage; - if (message.executionTimeout != null && message.hasOwnProperty("executionTimeout")) - object.executionTimeout = $root.google.protobuf.Duration.toObject(message.executionTimeout, options); + if (options.defaults) + object.rollbackConfig = null; + if (message.rollbackConfig != null && message.hasOwnProperty("rollbackConfig")) + object.rollbackConfig = $root.google.cloud.deploy.v1.RollbackTargetConfig.toObject(message.rollbackConfig, options); return object; }; /** - * Converts this ExecutionConfig to JSON. + * Converts this RollbackTargetResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @instance * @returns {Object.} JSON object */ - ExecutionConfig.prototype.toJSON = function toJSON() { + RollbackTargetResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecutionConfig + * Gets the default type url for RollbackTargetResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ExecutionConfig + * @memberof google.cloud.deploy.v1.RollbackTargetResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecutionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RollbackTargetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ExecutionConfig"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RollbackTargetResponse"; }; - /** - * ExecutionEnvironmentUsage enum. - * @name google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage - * @enum {number} - * @property {number} EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED=0 EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED value - * @property {number} RENDER=1 RENDER value - * @property {number} DEPLOY=2 DEPLOY value - * @property {number} VERIFY=3 VERIFY value - * @property {number} PREDEPLOY=4 PREDEPLOY value - * @property {number} POSTDEPLOY=5 POSTDEPLOY value - */ - ExecutionConfig.ExecutionEnvironmentUsage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RENDER"] = 1; - values[valuesById[2] = "DEPLOY"] = 2; - values[valuesById[3] = "VERIFY"] = 3; - values[valuesById[4] = "PREDEPLOY"] = 4; - values[valuesById[5] = "POSTDEPLOY"] = 5; - return values; - })(); - - return ExecutionConfig; + return RollbackTargetResponse; })(); - v1.DefaultPool = (function() { + v1.Target = (function() { /** - * Properties of a DefaultPool. + * Properties of a Target. * @memberof google.cloud.deploy.v1 - * @interface IDefaultPool - * @property {string|null} [serviceAccount] DefaultPool serviceAccount - * @property {string|null} [artifactStorage] DefaultPool artifactStorage + * @interface ITarget + * @property {string|null} [name] Target name + * @property {string|null} [targetId] Target targetId + * @property {string|null} [uid] Target uid + * @property {string|null} [description] Target description + * @property {Object.|null} [annotations] Target annotations + * @property {Object.|null} [labels] Target labels + * @property {boolean|null} [requireApproval] Target requireApproval + * @property {google.protobuf.ITimestamp|null} [createTime] Target createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Target updateTime + * @property {google.cloud.deploy.v1.IGkeCluster|null} [gke] Target gke + * @property {google.cloud.deploy.v1.IAnthosCluster|null} [anthosCluster] Target anthosCluster + * @property {google.cloud.deploy.v1.ICloudRunLocation|null} [run] Target run + * @property {google.cloud.deploy.v1.IMultiTarget|null} [multiTarget] Target multiTarget + * @property {string|null} [etag] Target etag + * @property {Array.|null} [executionConfigs] Target executionConfigs + * @property {Object.|null} [deployParameters] Target deployParameters */ /** - * Constructs a new DefaultPool. + * Constructs a new Target. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DefaultPool. - * @implements IDefaultPool + * @classdesc Represents a Target. + * @implements ITarget * @constructor - * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set */ - function DefaultPool(properties) { + function Target(properties) { + this.annotations = {}; + this.labels = {}; + this.executionConfigs = []; + this.deployParameters = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9677,331 +10301,362 @@ } /** - * DefaultPool serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.deploy.v1.DefaultPool + * Target name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Target * @instance */ - DefaultPool.prototype.serviceAccount = ""; + Target.prototype.name = ""; /** - * DefaultPool artifactStorage. - * @member {string} artifactStorage - * @memberof google.cloud.deploy.v1.DefaultPool + * Target targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Target * @instance */ - DefaultPool.prototype.artifactStorage = ""; + Target.prototype.targetId = ""; /** - * Creates a new DefaultPool instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool instance + * Target uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.create = function create(properties) { - return new DefaultPool(properties); - }; + Target.prototype.uid = ""; /** - * Encodes the specified DefaultPool message. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Target description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); - if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactStorage); - return writer; - }; + Target.prototype.description = ""; /** - * Encodes the specified DefaultPool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Target annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Target.prototype.annotations = $util.emptyObject; /** - * Decodes a DefaultPool message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Target labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DefaultPool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.serviceAccount = reader.string(); - break; - } - case 2: { - message.artifactStorage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Target.prototype.labels = $util.emptyObject; /** - * Decodes a DefaultPool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Target requireApproval. + * @member {boolean} requireApproval + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Target.prototype.requireApproval = false; /** - * Verifies a DefaultPool message. - * @function verify - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Target createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - if (!$util.isString(message.artifactStorage)) - return "artifactStorage: string expected"; - return null; - }; + Target.prototype.createTime = null; /** - * Creates a DefaultPool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool + * Target updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DefaultPool) - return object; - var message = new $root.google.cloud.deploy.v1.DefaultPool(); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactStorage != null) - message.artifactStorage = String(object.artifactStorage); - return message; - }; + Target.prototype.updateTime = null; /** - * Creates a plain object from a DefaultPool message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {google.cloud.deploy.v1.DefaultPool} message DefaultPool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Target gke. + * @member {google.cloud.deploy.v1.IGkeCluster|null|undefined} gke + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.serviceAccount = ""; - object.artifactStorage = ""; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - object.artifactStorage = message.artifactStorage; - return object; - }; + Target.prototype.gke = null; /** - * Converts this DefaultPool to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.DefaultPool + * Target anthosCluster. + * @member {google.cloud.deploy.v1.IAnthosCluster|null|undefined} anthosCluster + * @memberof google.cloud.deploy.v1.Target * @instance - * @returns {Object.} JSON object */ - DefaultPool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Target.prototype.anthosCluster = null; /** - * Gets the default type url for DefaultPool - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DefaultPool - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Target run. + * @member {google.cloud.deploy.v1.ICloudRunLocation|null|undefined} run + * @memberof google.cloud.deploy.v1.Target + * @instance */ - DefaultPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.DefaultPool"; - }; - - return DefaultPool; - })(); - - v1.PrivatePool = (function() { + Target.prototype.run = null; /** - * Properties of a PrivatePool. - * @memberof google.cloud.deploy.v1 - * @interface IPrivatePool - * @property {string|null} [workerPool] PrivatePool workerPool - * @property {string|null} [serviceAccount] PrivatePool serviceAccount - * @property {string|null} [artifactStorage] PrivatePool artifactStorage + * Target multiTarget. + * @member {google.cloud.deploy.v1.IMultiTarget|null|undefined} multiTarget + * @memberof google.cloud.deploy.v1.Target + * @instance */ + Target.prototype.multiTarget = null; /** - * Constructs a new PrivatePool. - * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PrivatePool. - * @implements IPrivatePool - * @constructor - * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set + * Target etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Target + * @instance */ - function PrivatePool(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Target.prototype.etag = ""; /** - * PrivatePool workerPool. - * @member {string} workerPool - * @memberof google.cloud.deploy.v1.PrivatePool + * Target executionConfigs. + * @member {Array.} executionConfigs + * @memberof google.cloud.deploy.v1.Target * @instance */ - PrivatePool.prototype.workerPool = ""; + Target.prototype.executionConfigs = $util.emptyArray; /** - * PrivatePool serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.deploy.v1.PrivatePool + * Target deployParameters. + * @member {Object.} deployParameters + * @memberof google.cloud.deploy.v1.Target * @instance */ - PrivatePool.prototype.serviceAccount = ""; + Target.prototype.deployParameters = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * PrivatePool artifactStorage. - * @member {string} artifactStorage - * @memberof google.cloud.deploy.v1.PrivatePool + * Target deploymentTarget. + * @member {"gke"|"anthosCluster"|"run"|"multiTarget"|undefined} deploymentTarget + * @memberof google.cloud.deploy.v1.Target * @instance */ - PrivatePool.prototype.artifactStorage = ""; + Object.defineProperty(Target.prototype, "deploymentTarget", { + get: $util.oneOfGetter($oneOfFields = ["gke", "anthosCluster", "run", "multiTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PrivatePool instance using the specified properties. + * Creates a new Target instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool instance + * @param {google.cloud.deploy.v1.ITarget=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Target} Target instance */ - PrivatePool.create = function create(properties) { - return new PrivatePool(properties); + Target.create = function create(properties) { + return new Target(properties); }; /** - * Encodes the specified PrivatePool message. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. + * Encodes the specified Target message. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode + * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivatePool.encode = function encode(message, writer) { + Target.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); - if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactStorage); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + 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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.etag); + if (message.requireApproval != null && Object.hasOwnProperty.call(message, "requireApproval")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.requireApproval); + if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) + $root.google.cloud.deploy.v1.GkeCluster.encode(message.gke, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.executionConfigs != null && message.executionConfigs.length) + for (var i = 0; i < message.executionConfigs.length; ++i) + $root.google.cloud.deploy.v1.ExecutionConfig.encode(message.executionConfigs[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.anthosCluster != null && Object.hasOwnProperty.call(message, "anthosCluster")) + $root.google.cloud.deploy.v1.AnthosCluster.encode(message.anthosCluster, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.run != null && Object.hasOwnProperty.call(message, "run")) + $root.google.cloud.deploy.v1.CloudRunLocation.encode(message.run, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.multiTarget != null && Object.hasOwnProperty.call(message, "multiTarget")) + $root.google.cloud.deploy.v1.MultiTarget.encode(message.multiTarget, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.deployParameters != null && Object.hasOwnProperty.call(message, "deployParameters")) + for (var keys = Object.keys(message.deployParameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.deployParameters[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified PrivatePool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. + * Encodes the specified Target message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Target.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode + * @param {google.cloud.deploy.v1.ITarget} message Target message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivatePool.encodeDelimited = function encodeDelimited(message, writer) { + Target.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrivatePool message from the specified reader or buffer. + * Decodes a Target message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @returns {google.cloud.deploy.v1.Target} Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivatePool.decode = function decode(reader, length) { + Target.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PrivatePool(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Target(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.workerPool = reader.string(); + message.name = reader.string(); break; } case 2: { - message.serviceAccount = reader.string(); + message.targetId = reader.string(); break; } case 3: { - message.artifactStorage = reader.string(); + message.uid = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + 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 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 13: { + message.requireApproval = reader.bool(); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 15: { + message.gke = $root.google.cloud.deploy.v1.GkeCluster.decode(reader, reader.uint32()); + break; + } + case 17: { + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.decode(reader, reader.uint32()); + break; + } + case 18: { + message.run = $root.google.cloud.deploy.v1.CloudRunLocation.decode(reader, reader.uint32()); + break; + } + case 19: { + message.multiTarget = $root.google.cloud.deploy.v1.MultiTarget.decode(reader, reader.uint32()); + break; + } + case 12: { + message.etag = reader.string(); + break; + } + case 16: { + if (!(message.executionConfigs && message.executionConfigs.length)) + message.executionConfigs = []; + message.executionConfigs.push($root.google.cloud.deploy.v1.ExecutionConfig.decode(reader, reader.uint32())); + break; + } + case 20: { + if (message.deployParameters === $util.emptyObject) + message.deployParameters = {}; + 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.deployParameters[key] = value; break; } default: @@ -10013,140 +10668,367 @@ }; /** - * Decodes a PrivatePool message from the specified reader or buffer, length delimited. + * Decodes a Target message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @returns {google.cloud.deploy.v1.Target} Target * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivatePool.decodeDelimited = function decodeDelimited(reader) { + Target.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivatePool message. + * Verifies a Target message. * @function verify - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivatePool.verify = function verify(message) { + Target.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - if (!$util.isString(message.artifactStorage)) - return "artifactStorage: string expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) + if (typeof message.requireApproval !== "boolean") + return "requireApproval: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.gke != null && message.hasOwnProperty("gke")) { + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.GkeCluster.verify(message.gke); + if (error) + return "gke." + error; + } + } + if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { + if (properties.deploymentTarget === 1) + return "deploymentTarget: multiple values"; + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.AnthosCluster.verify(message.anthosCluster); + if (error) + return "anthosCluster." + error; + } + } + if (message.run != null && message.hasOwnProperty("run")) { + if (properties.deploymentTarget === 1) + return "deploymentTarget: multiple values"; + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.CloudRunLocation.verify(message.run); + if (error) + return "run." + error; + } + } + if (message.multiTarget != null && message.hasOwnProperty("multiTarget")) { + if (properties.deploymentTarget === 1) + return "deploymentTarget: multiple values"; + properties.deploymentTarget = 1; + { + var error = $root.google.cloud.deploy.v1.MultiTarget.verify(message.multiTarget); + if (error) + return "multiTarget." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.executionConfigs != null && message.hasOwnProperty("executionConfigs")) { + if (!Array.isArray(message.executionConfigs)) + return "executionConfigs: array expected"; + for (var i = 0; i < message.executionConfigs.length; ++i) { + var error = $root.google.cloud.deploy.v1.ExecutionConfig.verify(message.executionConfigs[i]); + if (error) + return "executionConfigs." + error; + } + } + if (message.deployParameters != null && message.hasOwnProperty("deployParameters")) { + if (!$util.isObject(message.deployParameters)) + return "deployParameters: object expected"; + var key = Object.keys(message.deployParameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.deployParameters[key[i]])) + return "deployParameters: string{k:string} expected"; + } return null; }; /** - * Creates a PrivatePool message from a plain object. Also converts values to their respective internal types. + * Creates a Target message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool + * @returns {google.cloud.deploy.v1.Target} Target */ - PrivatePool.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PrivatePool) + Target.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Target) return object; - var message = new $root.google.cloud.deploy.v1.PrivatePool(); - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.artifactStorage != null) - message.artifactStorage = String(object.artifactStorage); + var message = new $root.google.cloud.deploy.v1.Target(); + if (object.name != null) + message.name = String(object.name); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.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.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.requireApproval != null) + message.requireApproval = Boolean(object.requireApproval); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.gke != null) { + if (typeof object.gke !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.gke: object expected"); + message.gke = $root.google.cloud.deploy.v1.GkeCluster.fromObject(object.gke); + } + if (object.anthosCluster != null) { + if (typeof object.anthosCluster !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.anthosCluster: object expected"); + message.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.fromObject(object.anthosCluster); + } + if (object.run != null) { + if (typeof object.run !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.run: object expected"); + message.run = $root.google.cloud.deploy.v1.CloudRunLocation.fromObject(object.run); + } + if (object.multiTarget != null) { + if (typeof object.multiTarget !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.multiTarget: object expected"); + message.multiTarget = $root.google.cloud.deploy.v1.MultiTarget.fromObject(object.multiTarget); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.executionConfigs) { + if (!Array.isArray(object.executionConfigs)) + throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: array expected"); + message.executionConfigs = []; + for (var i = 0; i < object.executionConfigs.length; ++i) { + if (typeof object.executionConfigs[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.executionConfigs: object expected"); + message.executionConfigs[i] = $root.google.cloud.deploy.v1.ExecutionConfig.fromObject(object.executionConfigs[i]); + } + } + if (object.deployParameters) { + if (typeof object.deployParameters !== "object") + throw TypeError(".google.cloud.deploy.v1.Target.deployParameters: object expected"); + message.deployParameters = {}; + for (var keys = Object.keys(object.deployParameters), i = 0; i < keys.length; ++i) + message.deployParameters[keys[i]] = String(object.deployParameters[keys[i]]); + } return message; }; /** - * Creates a plain object from a PrivatePool message. Also converts values to other types if specified. + * Creates a plain object from a Target message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static - * @param {google.cloud.deploy.v1.PrivatePool} message PrivatePool + * @param {google.cloud.deploy.v1.Target} message Target * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivatePool.toObject = function toObject(message, options) { + Target.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.executionConfigs = []; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + object.deployParameters = {}; + } if (options.defaults) { - object.workerPool = ""; - object.serviceAccount = ""; - object.artifactStorage = ""; + object.name = ""; + object.targetId = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.requireApproval = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.requireApproval != null && message.hasOwnProperty("requireApproval")) + object.requireApproval = message.requireApproval; + if (message.gke != null && message.hasOwnProperty("gke")) { + object.gke = $root.google.cloud.deploy.v1.GkeCluster.toObject(message.gke, options); + if (options.oneofs) + object.deploymentTarget = "gke"; + } + if (message.executionConfigs && message.executionConfigs.length) { + object.executionConfigs = []; + for (var j = 0; j < message.executionConfigs.length; ++j) + object.executionConfigs[j] = $root.google.cloud.deploy.v1.ExecutionConfig.toObject(message.executionConfigs[j], options); + } + if (message.anthosCluster != null && message.hasOwnProperty("anthosCluster")) { + object.anthosCluster = $root.google.cloud.deploy.v1.AnthosCluster.toObject(message.anthosCluster, options); + if (options.oneofs) + object.deploymentTarget = "anthosCluster"; + } + if (message.run != null && message.hasOwnProperty("run")) { + object.run = $root.google.cloud.deploy.v1.CloudRunLocation.toObject(message.run, options); + if (options.oneofs) + object.deploymentTarget = "run"; + } + if (message.multiTarget != null && message.hasOwnProperty("multiTarget")) { + object.multiTarget = $root.google.cloud.deploy.v1.MultiTarget.toObject(message.multiTarget, options); + if (options.oneofs) + object.deploymentTarget = "multiTarget"; + } + if (message.deployParameters && (keys2 = Object.keys(message.deployParameters)).length) { + object.deployParameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.deployParameters[keys2[j]] = message.deployParameters[keys2[j]]; } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = message.workerPool; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) - object.artifactStorage = message.artifactStorage; return object; }; /** - * Converts this PrivatePool to JSON. + * Converts this Target to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @instance * @returns {Object.} JSON object */ - PrivatePool.prototype.toJSON = function toJSON() { + Target.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivatePool + * Gets the default type url for Target * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PrivatePool + * @memberof google.cloud.deploy.v1.Target * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivatePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PrivatePool"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Target"; }; - return PrivatePool; + return Target; })(); - v1.GkeCluster = (function() { + v1.ExecutionConfig = (function() { /** - * Properties of a GkeCluster. + * Properties of an ExecutionConfig. * @memberof google.cloud.deploy.v1 - * @interface IGkeCluster - * @property {string|null} [cluster] GkeCluster cluster - * @property {boolean|null} [internalIp] GkeCluster internalIp - */ - + * @interface IExecutionConfig + * @property {Array.|null} [usages] ExecutionConfig usages + * @property {google.cloud.deploy.v1.IDefaultPool|null} [defaultPool] ExecutionConfig defaultPool + * @property {google.cloud.deploy.v1.IPrivatePool|null} [privatePool] ExecutionConfig privatePool + * @property {string|null} [workerPool] ExecutionConfig workerPool + * @property {string|null} [serviceAccount] ExecutionConfig serviceAccount + * @property {string|null} [artifactStorage] ExecutionConfig artifactStorage + * @property {google.protobuf.IDuration|null} [executionTimeout] ExecutionConfig executionTimeout + */ + /** - * Constructs a new GkeCluster. + * Constructs a new ExecutionConfig. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GkeCluster. - * @implements IGkeCluster + * @classdesc Represents an ExecutionConfig. + * @implements IExecutionConfig * @constructor - * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set */ - function GkeCluster(properties) { + function ExecutionConfig(properties) { + this.usages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10154,89 +11036,184 @@ } /** - * GkeCluster cluster. - * @member {string} cluster - * @memberof google.cloud.deploy.v1.GkeCluster + * ExecutionConfig usages. + * @member {Array.} usages + * @memberof google.cloud.deploy.v1.ExecutionConfig * @instance */ - GkeCluster.prototype.cluster = ""; + ExecutionConfig.prototype.usages = $util.emptyArray; /** - * GkeCluster internalIp. - * @member {boolean} internalIp - * @memberof google.cloud.deploy.v1.GkeCluster + * ExecutionConfig defaultPool. + * @member {google.cloud.deploy.v1.IDefaultPool|null|undefined} defaultPool + * @memberof google.cloud.deploy.v1.ExecutionConfig * @instance */ - GkeCluster.prototype.internalIp = false; + ExecutionConfig.prototype.defaultPool = null; /** - * Creates a new GkeCluster instance using the specified properties. + * ExecutionConfig privatePool. + * @member {google.cloud.deploy.v1.IPrivatePool|null|undefined} privatePool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.privatePool = null; + + /** + * ExecutionConfig workerPool. + * @member {string} workerPool + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.workerPool = ""; + + /** + * ExecutionConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.serviceAccount = ""; + + /** + * ExecutionConfig artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.artifactStorage = ""; + + /** + * ExecutionConfig executionTimeout. + * @member {google.protobuf.IDuration|null|undefined} executionTimeout + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + ExecutionConfig.prototype.executionTimeout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecutionConfig executionEnvironment. + * @member {"defaultPool"|"privatePool"|undefined} executionEnvironment + * @memberof google.cloud.deploy.v1.ExecutionConfig + * @instance + */ + Object.defineProperty(ExecutionConfig.prototype, "executionEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["defaultPool", "privatePool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecutionConfig instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster instance + * @param {google.cloud.deploy.v1.IExecutionConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig instance */ - GkeCluster.create = function create(properties) { - return new GkeCluster(properties); + ExecutionConfig.create = function create(properties) { + return new ExecutionConfig(properties); }; /** - * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * Encodes the specified ExecutionConfig message. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GkeCluster.encode = function encode(message, writer) { + ExecutionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.internalIp); + if (message.usages != null && message.usages.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.usages.length; ++i) + writer.int32(message.usages[i]); + writer.ldelim(); + } + if (message.defaultPool != null && Object.hasOwnProperty.call(message, "defaultPool")) + $root.google.cloud.deploy.v1.DefaultPool.encode(message.defaultPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.privatePool != null && Object.hasOwnProperty.call(message, "privatePool")) + $root.google.cloud.deploy.v1.PrivatePool.encode(message.privatePool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.workerPool); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.artifactStorage); + if (message.executionTimeout != null && Object.hasOwnProperty.call(message, "executionTimeout")) + $root.google.protobuf.Duration.encode(message.executionTimeout, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. + * Encodes the specified ExecutionConfig message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ExecutionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IExecutionConfig} message ExecutionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { + ExecutionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GkeCluster message from the specified reader or buffer. + * Decodes an ExecutionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GkeCluster.decode = function decode(reader, length) { + ExecutionConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GkeCluster(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ExecutionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cluster = reader.string(); + if (!(message.usages && message.usages.length)) + message.usages = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.usages.push(reader.int32()); + } else + message.usages.push(reader.int32()); break; } case 2: { - message.internalIp = reader.bool(); + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.decode(reader, reader.uint32()); + break; + } + case 3: { + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.decode(reader, reader.uint32()); + break; + } + case 4: { + message.workerPool = reader.string(); + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 6: { + message.artifactStorage = reader.string(); + break; + } + case 7: { + message.executionTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -10248,131 +11225,274 @@ }; /** - * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * Decodes an ExecutionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GkeCluster.decodeDelimited = function decodeDelimited(reader) { + ExecutionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GkeCluster message. + * Verifies an ExecutionConfig message. * @function verify - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GkeCluster.verify = function verify(message) { + ExecutionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) - if (!$util.isString(message.cluster)) - return "cluster: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (typeof message.internalIp !== "boolean") - return "internalIp: boolean expected"; + var properties = {}; + if (message.usages != null && message.hasOwnProperty("usages")) { + if (!Array.isArray(message.usages)) + return "usages: array expected"; + for (var i = 0; i < message.usages.length; ++i) + switch (message.usages[i]) { + default: + return "usages: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { + properties.executionEnvironment = 1; + { + var error = $root.google.cloud.deploy.v1.DefaultPool.verify(message.defaultPool); + if (error) + return "defaultPool." + error; + } + } + if (message.privatePool != null && message.hasOwnProperty("privatePool")) { + if (properties.executionEnvironment === 1) + return "executionEnvironment: multiple values"; + properties.executionEnvironment = 1; + { + var error = $root.google.cloud.deploy.v1.PrivatePool.verify(message.privatePool); + if (error) + return "privatePool." + error; + } + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; + if (message.executionTimeout != null && message.hasOwnProperty("executionTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.executionTimeout); + if (error) + return "executionTimeout." + error; + } return null; }; /** - * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * Creates an ExecutionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster + * @returns {google.cloud.deploy.v1.ExecutionConfig} ExecutionConfig */ - GkeCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GkeCluster) + ExecutionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ExecutionConfig) return object; - var message = new $root.google.cloud.deploy.v1.GkeCluster(); - if (object.cluster != null) - message.cluster = String(object.cluster); - if (object.internalIp != null) - message.internalIp = Boolean(object.internalIp); + var message = new $root.google.cloud.deploy.v1.ExecutionConfig(); + if (object.usages) { + if (!Array.isArray(object.usages)) + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.usages: array expected"); + message.usages = []; + for (var i = 0; i < object.usages.length; ++i) + switch (object.usages[i]) { + default: + if (typeof object.usages[i] === "number") { + message.usages[i] = object.usages[i]; + break; + } + case "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED": + case 0: + message.usages[i] = 0; + break; + case "RENDER": + case 1: + message.usages[i] = 1; + break; + case "DEPLOY": + case 2: + message.usages[i] = 2; + break; + case "VERIFY": + case 3: + message.usages[i] = 3; + break; + case "PREDEPLOY": + case 4: + message.usages[i] = 4; + break; + case "POSTDEPLOY": + case 5: + message.usages[i] = 5; + break; + } + } + if (object.defaultPool != null) { + if (typeof object.defaultPool !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.defaultPool: object expected"); + message.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.fromObject(object.defaultPool); + } + if (object.privatePool != null) { + if (typeof object.privatePool !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.privatePool: object expected"); + message.privatePool = $root.google.cloud.deploy.v1.PrivatePool.fromObject(object.privatePool); + } + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); + if (object.executionTimeout != null) { + if (typeof object.executionTimeout !== "object") + throw TypeError(".google.cloud.deploy.v1.ExecutionConfig.executionTimeout: object expected"); + message.executionTimeout = $root.google.protobuf.Duration.fromObject(object.executionTimeout); + } return message; }; /** - * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. + * Creates a plain object from an ExecutionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static - * @param {google.cloud.deploy.v1.GkeCluster} message GkeCluster + * @param {google.cloud.deploy.v1.ExecutionConfig} message ExecutionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GkeCluster.toObject = function toObject(message, options) { + ExecutionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.usages = []; if (options.defaults) { - object.cluster = ""; - object.internalIp = false; + object.workerPool = ""; + object.serviceAccount = ""; + object.artifactStorage = ""; + object.executionTimeout = null; } - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = message.cluster; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; + if (message.usages && message.usages.length) { + object.usages = []; + for (var j = 0; j < message.usages.length; ++j) + object.usages[j] = options.enums === String ? $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] === undefined ? message.usages[j] : $root.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage[message.usages[j]] : message.usages[j]; + } + if (message.defaultPool != null && message.hasOwnProperty("defaultPool")) { + object.defaultPool = $root.google.cloud.deploy.v1.DefaultPool.toObject(message.defaultPool, options); + if (options.oneofs) + object.executionEnvironment = "defaultPool"; + } + if (message.privatePool != null && message.hasOwnProperty("privatePool")) { + object.privatePool = $root.google.cloud.deploy.v1.PrivatePool.toObject(message.privatePool, options); + if (options.oneofs) + object.executionEnvironment = "privatePool"; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; + if (message.executionTimeout != null && message.hasOwnProperty("executionTimeout")) + object.executionTimeout = $root.google.protobuf.Duration.toObject(message.executionTimeout, options); return object; }; /** - * Converts this GkeCluster to JSON. + * Converts this ExecutionConfig to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @instance * @returns {Object.} JSON object */ - GkeCluster.prototype.toJSON = function toJSON() { + ExecutionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GkeCluster + * Gets the default type url for ExecutionConfig * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GkeCluster + * @memberof google.cloud.deploy.v1.ExecutionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecutionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GkeCluster"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ExecutionConfig"; }; - return GkeCluster; + /** + * ExecutionEnvironmentUsage enum. + * @name google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentUsage + * @enum {number} + * @property {number} EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED=0 EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED value + * @property {number} RENDER=1 RENDER value + * @property {number} DEPLOY=2 DEPLOY value + * @property {number} VERIFY=3 VERIFY value + * @property {number} PREDEPLOY=4 PREDEPLOY value + * @property {number} POSTDEPLOY=5 POSTDEPLOY value + */ + ExecutionConfig.ExecutionEnvironmentUsage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RENDER"] = 1; + values[valuesById[2] = "DEPLOY"] = 2; + values[valuesById[3] = "VERIFY"] = 3; + values[valuesById[4] = "PREDEPLOY"] = 4; + values[valuesById[5] = "POSTDEPLOY"] = 5; + return values; + })(); + + return ExecutionConfig; })(); - v1.AnthosCluster = (function() { + v1.DefaultPool = (function() { /** - * Properties of an AnthosCluster. + * Properties of a DefaultPool. * @memberof google.cloud.deploy.v1 - * @interface IAnthosCluster - * @property {string|null} [membership] AnthosCluster membership + * @interface IDefaultPool + * @property {string|null} [serviceAccount] DefaultPool serviceAccount + * @property {string|null} [artifactStorage] DefaultPool artifactStorage */ /** - * Constructs a new AnthosCluster. + * Constructs a new DefaultPool. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AnthosCluster. - * @implements IAnthosCluster + * @classdesc Represents a DefaultPool. + * @implements IDefaultPool * @constructor - * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set */ - function AnthosCluster(properties) { + function DefaultPool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10380,75 +11500,89 @@ } /** - * AnthosCluster membership. - * @member {string} membership - * @memberof google.cloud.deploy.v1.AnthosCluster + * DefaultPool serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.DefaultPool * @instance */ - AnthosCluster.prototype.membership = ""; + DefaultPool.prototype.serviceAccount = ""; /** - * Creates a new AnthosCluster instance using the specified properties. + * DefaultPool artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.DefaultPool + * @instance + */ + DefaultPool.prototype.artifactStorage = ""; + + /** + * Creates a new DefaultPool instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster instance + * @param {google.cloud.deploy.v1.IDefaultPool=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool instance */ - AnthosCluster.create = function create(properties) { - return new AnthosCluster(properties); + DefaultPool.create = function create(properties) { + return new DefaultPool(properties); }; /** - * Encodes the specified AnthosCluster message. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * Encodes the specified DefaultPool message. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnthosCluster.encode = function encode(message, writer) { + DefaultPool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.membership); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactStorage); return writer; }; /** - * Encodes the specified AnthosCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. + * Encodes the specified DefaultPool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DefaultPool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode + * @param {google.cloud.deploy.v1.IDefaultPool} message DefaultPool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnthosCluster.encodeDelimited = function encodeDelimited(message, writer) { + DefaultPool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnthosCluster message from the specified reader or buffer. + * Decodes a DefaultPool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnthosCluster.decode = function decode(reader, length) { + DefaultPool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AnthosCluster(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DefaultPool(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.membership = reader.string(); + message.serviceAccount = reader.string(); + break; + } + case 2: { + message.artifactStorage = reader.string(); break; } default: @@ -10460,122 +11594,133 @@ }; /** - * Decodes an AnthosCluster message from the specified reader or buffer, length delimited. + * Decodes a DefaultPool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnthosCluster.decodeDelimited = function decodeDelimited(reader) { + DefaultPool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnthosCluster message. + * Verifies a DefaultPool message. * @function verify - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnthosCluster.verify = function verify(message) { + DefaultPool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.membership != null && message.hasOwnProperty("membership")) - if (!$util.isString(message.membership)) - return "membership: string expected"; - return null; - }; - - /** - * Creates an AnthosCluster message from a plain object. Also converts values to their respective internal types. + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; + return null; + }; + + /** + * Creates a DefaultPool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster + * @returns {google.cloud.deploy.v1.DefaultPool} DefaultPool */ - AnthosCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AnthosCluster) + DefaultPool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DefaultPool) return object; - var message = new $root.google.cloud.deploy.v1.AnthosCluster(); - if (object.membership != null) - message.membership = String(object.membership); + var message = new $root.google.cloud.deploy.v1.DefaultPool(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); return message; }; /** - * Creates a plain object from an AnthosCluster message. Also converts values to other types if specified. + * Creates a plain object from a DefaultPool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static - * @param {google.cloud.deploy.v1.AnthosCluster} message AnthosCluster + * @param {google.cloud.deploy.v1.DefaultPool} message DefaultPool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnthosCluster.toObject = function toObject(message, options) { + DefaultPool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.membership = ""; - if (message.membership != null && message.hasOwnProperty("membership")) - object.membership = message.membership; + if (options.defaults) { + object.serviceAccount = ""; + object.artifactStorage = ""; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; return object; }; /** - * Converts this AnthosCluster to JSON. + * Converts this DefaultPool to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @instance * @returns {Object.} JSON object */ - AnthosCluster.prototype.toJSON = function toJSON() { + DefaultPool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnthosCluster + * Gets the default type url for DefaultPool * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AnthosCluster + * @memberof google.cloud.deploy.v1.DefaultPool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnthosCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DefaultPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AnthosCluster"; + return typeUrlPrefix + "/google.cloud.deploy.v1.DefaultPool"; }; - return AnthosCluster; + return DefaultPool; })(); - v1.CloudRunLocation = (function() { + v1.PrivatePool = (function() { /** - * Properties of a CloudRunLocation. + * Properties of a PrivatePool. * @memberof google.cloud.deploy.v1 - * @interface ICloudRunLocation - * @property {string|null} [location] CloudRunLocation location + * @interface IPrivatePool + * @property {string|null} [workerPool] PrivatePool workerPool + * @property {string|null} [serviceAccount] PrivatePool serviceAccount + * @property {string|null} [artifactStorage] PrivatePool artifactStorage */ /** - * Constructs a new CloudRunLocation. + * Constructs a new PrivatePool. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CloudRunLocation. - * @implements ICloudRunLocation + * @classdesc Represents a PrivatePool. + * @implements IPrivatePool * @constructor - * @param {google.cloud.deploy.v1.ICloudRunLocation=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set */ - function CloudRunLocation(properties) { + function PrivatePool(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10583,75 +11728,103 @@ } /** - * CloudRunLocation location. - * @member {string} location - * @memberof google.cloud.deploy.v1.CloudRunLocation + * PrivatePool workerPool. + * @member {string} workerPool + * @memberof google.cloud.deploy.v1.PrivatePool * @instance */ - CloudRunLocation.prototype.location = ""; + PrivatePool.prototype.workerPool = ""; /** - * Creates a new CloudRunLocation instance using the specified properties. + * PrivatePool serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.PrivatePool + * @instance + */ + PrivatePool.prototype.serviceAccount = ""; + + /** + * PrivatePool artifactStorage. + * @member {string} artifactStorage + * @memberof google.cloud.deploy.v1.PrivatePool + * @instance + */ + PrivatePool.prototype.artifactStorage = ""; + + /** + * Creates a new PrivatePool instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.ICloudRunLocation=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation instance + * @param {google.cloud.deploy.v1.IPrivatePool=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool instance */ - CloudRunLocation.create = function create(properties) { - return new CloudRunLocation(properties); + PrivatePool.create = function create(properties) { + return new PrivatePool(properties); }; /** - * Encodes the specified CloudRunLocation message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. + * Encodes the specified PrivatePool message. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.ICloudRunLocation} message CloudRunLocation message or plain object to encode + * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRunLocation.encode = function encode(message, writer) { + PrivatePool.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.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccount); + if (message.artifactStorage != null && Object.hasOwnProperty.call(message, "artifactStorage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactStorage); return writer; }; /** - * Encodes the specified CloudRunLocation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. + * Encodes the specified PrivatePool message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PrivatePool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.ICloudRunLocation} message CloudRunLocation message or plain object to encode + * @param {google.cloud.deploy.v1.IPrivatePool} message PrivatePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRunLocation.encodeDelimited = function encodeDelimited(message, writer) { + PrivatePool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudRunLocation message from the specified reader or buffer. + * Decodes a PrivatePool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRunLocation.decode = function decode(reader, length) { + PrivatePool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunLocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PrivatePool(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.location = reader.string(); + message.workerPool = reader.string(); + break; + } + case 2: { + message.serviceAccount = reader.string(); + break; + } + case 3: { + message.artifactStorage = reader.string(); break; } default: @@ -10663,123 +11836,140 @@ }; /** - * Decodes a CloudRunLocation message from the specified reader or buffer, length delimited. + * Decodes a PrivatePool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRunLocation.decodeDelimited = function decodeDelimited(reader) { + PrivatePool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudRunLocation message. + * Verifies a PrivatePool message. * @function verify - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudRunLocation.verify = function verify(message) { + PrivatePool.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.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + if (!$util.isString(message.artifactStorage)) + return "artifactStorage: string expected"; return null; }; /** - * Creates a CloudRunLocation message from a plain object. Also converts values to their respective internal types. + * Creates a PrivatePool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation + * @returns {google.cloud.deploy.v1.PrivatePool} PrivatePool */ - CloudRunLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CloudRunLocation) + PrivatePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PrivatePool) return object; - var message = new $root.google.cloud.deploy.v1.CloudRunLocation(); - if (object.location != null) - message.location = String(object.location); + var message = new $root.google.cloud.deploy.v1.PrivatePool(); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.artifactStorage != null) + message.artifactStorage = String(object.artifactStorage); return message; }; /** - * Creates a plain object from a CloudRunLocation message. Also converts values to other types if specified. + * Creates a plain object from a PrivatePool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static - * @param {google.cloud.deploy.v1.CloudRunLocation} message CloudRunLocation + * @param {google.cloud.deploy.v1.PrivatePool} message PrivatePool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudRunLocation.toObject = function toObject(message, options) { + PrivatePool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.location = ""; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; + if (options.defaults) { + object.workerPool = ""; + object.serviceAccount = ""; + object.artifactStorage = ""; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.artifactStorage != null && message.hasOwnProperty("artifactStorage")) + object.artifactStorage = message.artifactStorage; return object; }; /** - * Converts this CloudRunLocation to JSON. + * Converts this PrivatePool to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @instance * @returns {Object.} JSON object */ - CloudRunLocation.prototype.toJSON = function toJSON() { + PrivatePool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudRunLocation + * Gets the default type url for PrivatePool * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CloudRunLocation + * @memberof google.cloud.deploy.v1.PrivatePool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudRunLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrivatePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunLocation"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PrivatePool"; }; - return CloudRunLocation; + return PrivatePool; })(); - v1.MultiTarget = (function() { + v1.GkeCluster = (function() { /** - * Properties of a MultiTarget. + * Properties of a GkeCluster. * @memberof google.cloud.deploy.v1 - * @interface IMultiTarget - * @property {Array.|null} [targetIds] MultiTarget targetIds + * @interface IGkeCluster + * @property {string|null} [cluster] GkeCluster cluster + * @property {boolean|null} [internalIp] GkeCluster internalIp */ /** - * Constructs a new MultiTarget. + * Constructs a new GkeCluster. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a MultiTarget. - * @implements IMultiTarget + * @classdesc Represents a GkeCluster. + * @implements IGkeCluster * @constructor - * @param {google.cloud.deploy.v1.IMultiTarget=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set */ - function MultiTarget(properties) { - this.targetIds = []; + function GkeCluster(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10787,78 +11977,89 @@ } /** - * MultiTarget targetIds. - * @member {Array.} targetIds - * @memberof google.cloud.deploy.v1.MultiTarget + * GkeCluster cluster. + * @member {string} cluster + * @memberof google.cloud.deploy.v1.GkeCluster * @instance */ - MultiTarget.prototype.targetIds = $util.emptyArray; + GkeCluster.prototype.cluster = ""; /** - * Creates a new MultiTarget instance using the specified properties. + * GkeCluster internalIp. + * @member {boolean} internalIp + * @memberof google.cloud.deploy.v1.GkeCluster + * @instance + */ + GkeCluster.prototype.internalIp = false; + + /** + * Creates a new GkeCluster instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.IMultiTarget=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget instance + * @param {google.cloud.deploy.v1.IGkeCluster=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster instance */ - MultiTarget.create = function create(properties) { - return new MultiTarget(properties); + GkeCluster.create = function create(properties) { + return new GkeCluster(properties); }; /** - * Encodes the specified MultiTarget message. Does not implicitly {@link google.cloud.deploy.v1.MultiTarget.verify|verify} messages. + * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.IMultiTarget} message MultiTarget message or plain object to encode + * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultiTarget.encode = function encode(message, writer) { + GkeCluster.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetIds != null && message.targetIds.length) - for (var i = 0; i < message.targetIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetIds[i]); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.internalIp); return writer; }; /** - * Encodes the specified MultiTarget message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.MultiTarget.verify|verify} messages. + * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GkeCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.IMultiTarget} message MultiTarget message or plain object to encode + * @param {google.cloud.deploy.v1.IGkeCluster} message GkeCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultiTarget.encodeDelimited = function encodeDelimited(message, writer) { + GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MultiTarget message from the specified reader or buffer. + * Decodes a GkeCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultiTarget.decode = function decode(reader, length) { + GkeCluster.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.MultiTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GkeCluster(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.targetIds && message.targetIds.length)) - message.targetIds = []; - message.targetIds.push(reader.string()); + message.cluster = reader.string(); + break; + } + case 2: { + message.internalIp = reader.bool(); break; } default: @@ -10870,138 +12071,131 @@ }; /** - * Decodes a MultiTarget message from the specified reader or buffer, length delimited. + * Decodes a GkeCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultiTarget.decodeDelimited = function decodeDelimited(reader) { + GkeCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MultiTarget message. + * Verifies a GkeCluster message. * @function verify - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MultiTarget.verify = function verify(message) { + GkeCluster.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetIds != null && message.hasOwnProperty("targetIds")) { - if (!Array.isArray(message.targetIds)) - return "targetIds: array expected"; - for (var i = 0; i < message.targetIds.length; ++i) - if (!$util.isString(message.targetIds[i])) - return "targetIds: string[] expected"; - } + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (typeof message.internalIp !== "boolean") + return "internalIp: boolean expected"; return null; }; /** - * Creates a MultiTarget message from a plain object. Also converts values to their respective internal types. + * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget + * @returns {google.cloud.deploy.v1.GkeCluster} GkeCluster */ - MultiTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.MultiTarget) + GkeCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GkeCluster) return object; - var message = new $root.google.cloud.deploy.v1.MultiTarget(); - if (object.targetIds) { - if (!Array.isArray(object.targetIds)) - throw TypeError(".google.cloud.deploy.v1.MultiTarget.targetIds: array expected"); - message.targetIds = []; - for (var i = 0; i < object.targetIds.length; ++i) - message.targetIds[i] = String(object.targetIds[i]); - } + var message = new $root.google.cloud.deploy.v1.GkeCluster(); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.internalIp != null) + message.internalIp = Boolean(object.internalIp); return message; }; /** - * Creates a plain object from a MultiTarget message. Also converts values to other types if specified. + * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static - * @param {google.cloud.deploy.v1.MultiTarget} message MultiTarget + * @param {google.cloud.deploy.v1.GkeCluster} message GkeCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MultiTarget.toObject = function toObject(message, options) { + GkeCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.targetIds = []; - if (message.targetIds && message.targetIds.length) { - object.targetIds = []; - for (var j = 0; j < message.targetIds.length; ++j) - object.targetIds[j] = message.targetIds[j]; + if (options.defaults) { + object.cluster = ""; + object.internalIp = false; } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; return object; }; /** - * Converts this MultiTarget to JSON. + * Converts this GkeCluster to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @instance * @returns {Object.} JSON object */ - MultiTarget.prototype.toJSON = function toJSON() { + GkeCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MultiTarget + * Gets the default type url for GkeCluster * @function getTypeUrl - * @memberof google.cloud.deploy.v1.MultiTarget + * @memberof google.cloud.deploy.v1.GkeCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MultiTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.MultiTarget"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GkeCluster"; }; - return MultiTarget; + return GkeCluster; })(); - v1.ListTargetsRequest = (function() { + v1.AnthosCluster = (function() { /** - * Properties of a ListTargetsRequest. + * Properties of an AnthosCluster. * @memberof google.cloud.deploy.v1 - * @interface IListTargetsRequest - * @property {string|null} [parent] ListTargetsRequest parent - * @property {number|null} [pageSize] ListTargetsRequest pageSize - * @property {string|null} [pageToken] ListTargetsRequest pageToken - * @property {string|null} [filter] ListTargetsRequest filter - * @property {string|null} [orderBy] ListTargetsRequest orderBy + * @interface IAnthosCluster + * @property {string|null} [membership] AnthosCluster membership */ /** - * Constructs a new ListTargetsRequest. + * Constructs a new AnthosCluster. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListTargetsRequest. - * @implements IListTargetsRequest + * @classdesc Represents an AnthosCluster. + * @implements IAnthosCluster * @constructor - * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set */ - function ListTargetsRequest(properties) { + function AnthosCluster(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11009,131 +12203,75 @@ } /** - * ListTargetsRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListTargetsRequest - * @instance - */ - ListTargetsRequest.prototype.parent = ""; - - /** - * ListTargetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListTargetsRequest - * @instance - */ - ListTargetsRequest.prototype.pageSize = 0; - - /** - * ListTargetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListTargetsRequest - * @instance - */ - ListTargetsRequest.prototype.pageToken = ""; - - /** - * ListTargetsRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListTargetsRequest - * @instance - */ - ListTargetsRequest.prototype.filter = ""; - - /** - * ListTargetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * AnthosCluster membership. + * @member {string} membership + * @memberof google.cloud.deploy.v1.AnthosCluster * @instance */ - ListTargetsRequest.prototype.orderBy = ""; + AnthosCluster.prototype.membership = ""; /** - * Creates a new ListTargetsRequest instance using the specified properties. + * Creates a new AnthosCluster instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest instance + * @param {google.cloud.deploy.v1.IAnthosCluster=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster instance */ - ListTargetsRequest.create = function create(properties) { - return new ListTargetsRequest(properties); + AnthosCluster.create = function create(properties) { + return new AnthosCluster(properties); }; /** - * Encodes the specified ListTargetsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * Encodes the specified AnthosCluster message. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsRequest.encode = function encode(message, writer) { + AnthosCluster.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.membership); return writer; }; /** - * Encodes the specified ListTargetsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. + * Encodes the specified AnthosCluster message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AnthosCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAnthosCluster} message AnthosCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + AnthosCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTargetsRequest message from the specified reader or buffer. + * Decodes an AnthosCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsRequest.decode = function decode(reader, length) { + AnthosCluster.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AnthosCluster(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.membership = reader.string(); break; } default: @@ -11145,159 +12283,122 @@ }; /** - * Decodes a ListTargetsRequest message from the specified reader or buffer, length delimited. + * Decodes an AnthosCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsRequest.decodeDelimited = function decodeDelimited(reader) { + AnthosCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTargetsRequest message. + * Verifies an AnthosCluster message. * @function verify - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTargetsRequest.verify = function verify(message) { + AnthosCluster.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.membership != null && message.hasOwnProperty("membership")) + if (!$util.isString(message.membership)) + return "membership: string expected"; return null; }; /** - * Creates a ListTargetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AnthosCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest + * @returns {google.cloud.deploy.v1.AnthosCluster} AnthosCluster */ - ListTargetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListTargetsRequest) + AnthosCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AnthosCluster) return object; - var message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.deploy.v1.AnthosCluster(); + if (object.membership != null) + message.membership = String(object.membership); return message; }; /** - * Creates a plain object from a ListTargetsRequest message. Also converts values to other types if specified. + * Creates a plain object from an AnthosCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static - * @param {google.cloud.deploy.v1.ListTargetsRequest} message ListTargetsRequest + * @param {google.cloud.deploy.v1.AnthosCluster} message AnthosCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTargetsRequest.toObject = function toObject(message, options) { + AnthosCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.membership = ""; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; return object; }; /** - * Converts this ListTargetsRequest to JSON. + * Converts this AnthosCluster to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @instance * @returns {Object.} JSON object */ - ListTargetsRequest.prototype.toJSON = function toJSON() { + AnthosCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTargetsRequest + * Gets the default type url for AnthosCluster * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListTargetsRequest + * @memberof google.cloud.deploy.v1.AnthosCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnthosCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AnthosCluster"; }; - return ListTargetsRequest; + return AnthosCluster; })(); - v1.ListTargetsResponse = (function() { + v1.CloudRunLocation = (function() { /** - * Properties of a ListTargetsResponse. + * Properties of a CloudRunLocation. * @memberof google.cloud.deploy.v1 - * @interface IListTargetsResponse - * @property {Array.|null} [targets] ListTargetsResponse targets - * @property {string|null} [nextPageToken] ListTargetsResponse nextPageToken - * @property {Array.|null} [unreachable] ListTargetsResponse unreachable + * @interface ICloudRunLocation + * @property {string|null} [location] CloudRunLocation location */ /** - * Constructs a new ListTargetsResponse. + * Constructs a new CloudRunLocation. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListTargetsResponse. - * @implements IListTargetsResponse + * @classdesc Represents a CloudRunLocation. + * @implements ICloudRunLocation * @constructor - * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICloudRunLocation=} [properties] Properties to set */ - function ListTargetsResponse(properties) { - this.targets = []; - this.unreachable = []; + function CloudRunLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11305,109 +12406,75 @@ } /** - * ListTargetsResponse targets. - * @member {Array.} targets - * @memberof google.cloud.deploy.v1.ListTargetsResponse - * @instance - */ - ListTargetsResponse.prototype.targets = $util.emptyArray; - - /** - * ListTargetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListTargetsResponse - * @instance - */ - ListTargetsResponse.prototype.nextPageToken = ""; - - /** - * ListTargetsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * CloudRunLocation location. + * @member {string} location + * @memberof google.cloud.deploy.v1.CloudRunLocation * @instance */ - ListTargetsResponse.prototype.unreachable = $util.emptyArray; + CloudRunLocation.prototype.location = ""; /** - * Creates a new ListTargetsResponse instance using the specified properties. + * Creates a new CloudRunLocation instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse instance + * @param {google.cloud.deploy.v1.ICloudRunLocation=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation instance */ - ListTargetsResponse.create = function create(properties) { - return new ListTargetsResponse(properties); + CloudRunLocation.create = function create(properties) { + return new CloudRunLocation(properties); }; /** - * Encodes the specified ListTargetsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * Encodes the specified CloudRunLocation message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.ICloudRunLocation} message CloudRunLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsResponse.encode = function encode(message, writer) { + CloudRunLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - $root.google.cloud.deploy.v1.Target.encode(message.targets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); return writer; }; /** - * Encodes the specified ListTargetsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. + * Encodes the specified CloudRunLocation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.ICloudRunLocation} message CloudRunLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CloudRunLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTargetsResponse message from the specified reader or buffer. + * Decodes a CloudRunLocation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsResponse.decode = function decode(reader, length) { + CloudRunLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.targets && message.targets.length)) - message.targets = []; - message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.location = reader.string(); break; } default: @@ -11419,169 +12486,123 @@ }; /** - * Decodes a ListTargetsResponse message from the specified reader or buffer, length delimited. + * Decodes a CloudRunLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTargetsResponse.decodeDelimited = function decodeDelimited(reader) { + CloudRunLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTargetsResponse message. + * Verifies a CloudRunLocation message. * @function verify - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTargetsResponse.verify = function verify(message) { + CloudRunLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.targets[i]); - if (error) - return "targets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; return null; }; /** - * Creates a ListTargetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CloudRunLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse + * @returns {google.cloud.deploy.v1.CloudRunLocation} CloudRunLocation */ - ListTargetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListTargetsResponse) + CloudRunLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CloudRunLocation) return object; - var message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) { - if (typeof object.targets[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: object expected"); - message.targets[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.deploy.v1.CloudRunLocation(); + if (object.location != null) + message.location = String(object.location); return message; }; /** - * Creates a plain object from a ListTargetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CloudRunLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static - * @param {google.cloud.deploy.v1.ListTargetsResponse} message ListTargetsResponse + * @param {google.cloud.deploy.v1.CloudRunLocation} message CloudRunLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTargetsResponse.toObject = function toObject(message, options) { + CloudRunLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.location = ""; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; return object; }; /** - * Converts this ListTargetsResponse to JSON. + * Converts this CloudRunLocation to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @instance * @returns {Object.} JSON object */ - ListTargetsResponse.prototype.toJSON = function toJSON() { + CloudRunLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTargetsResponse + * Gets the default type url for CloudRunLocation * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListTargetsResponse + * @memberof google.cloud.deploy.v1.CloudRunLocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudRunLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunLocation"; }; - return ListTargetsResponse; + return CloudRunLocation; })(); - v1.GetTargetRequest = (function() { + v1.MultiTarget = (function() { /** - * Properties of a GetTargetRequest. + * Properties of a MultiTarget. * @memberof google.cloud.deploy.v1 - * @interface IGetTargetRequest - * @property {string|null} [name] GetTargetRequest name + * @interface IMultiTarget + * @property {Array.|null} [targetIds] MultiTarget targetIds */ /** - * Constructs a new GetTargetRequest. + * Constructs a new MultiTarget. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetTargetRequest. - * @implements IGetTargetRequest + * @classdesc Represents a MultiTarget. + * @implements IMultiTarget * @constructor - * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IMultiTarget=} [properties] Properties to set */ - function GetTargetRequest(properties) { + function MultiTarget(properties) { + this.targetIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11589,75 +12610,78 @@ } /** - * GetTargetRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetTargetRequest + * MultiTarget targetIds. + * @member {Array.} targetIds + * @memberof google.cloud.deploy.v1.MultiTarget * @instance */ - GetTargetRequest.prototype.name = ""; + MultiTarget.prototype.targetIds = $util.emptyArray; /** - * Creates a new GetTargetRequest instance using the specified properties. + * Creates a new MultiTarget instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static - * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest instance + * @param {google.cloud.deploy.v1.IMultiTarget=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget instance */ - GetTargetRequest.create = function create(properties) { - return new GetTargetRequest(properties); + MultiTarget.create = function create(properties) { + return new MultiTarget(properties); }; /** - * Encodes the specified GetTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * Encodes the specified MultiTarget message. Does not implicitly {@link google.cloud.deploy.v1.MultiTarget.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static - * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IMultiTarget} message MultiTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTargetRequest.encode = function encode(message, writer) { + MultiTarget.encode = function encode(message, writer) { 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.targetIds != null && message.targetIds.length) + for (var i = 0; i < message.targetIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetIds[i]); return writer; }; /** - * Encodes the specified GetTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. + * Encodes the specified MultiTarget message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.MultiTarget.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static - * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IMultiTarget} message MultiTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + MultiTarget.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTargetRequest message from the specified reader or buffer. + * Decodes a MultiTarget message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTargetRequest.decode = function decode(reader, length) { + MultiTarget.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.MultiTarget(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.targetIds && message.targetIds.length)) + message.targetIds = []; + message.targetIds.push(reader.string()); break; } default: @@ -11669,126 +12693,138 @@ }; /** - * Decodes a GetTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a MultiTarget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTargetRequest.decodeDelimited = function decodeDelimited(reader) { + MultiTarget.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTargetRequest message. + * Verifies a MultiTarget message. * @function verify - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTargetRequest.verify = function verify(message) { + MultiTarget.verify = function verify(message) { if (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.targetIds != null && message.hasOwnProperty("targetIds")) { + if (!Array.isArray(message.targetIds)) + return "targetIds: array expected"; + for (var i = 0; i < message.targetIds.length; ++i) + if (!$util.isString(message.targetIds[i])) + return "targetIds: string[] expected"; + } return null; }; /** - * Creates a GetTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MultiTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest + * @returns {google.cloud.deploy.v1.MultiTarget} MultiTarget */ - GetTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetTargetRequest) + MultiTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.MultiTarget) return object; - var message = new $root.google.cloud.deploy.v1.GetTargetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.MultiTarget(); + if (object.targetIds) { + if (!Array.isArray(object.targetIds)) + throw TypeError(".google.cloud.deploy.v1.MultiTarget.targetIds: array expected"); + message.targetIds = []; + for (var i = 0; i < object.targetIds.length; ++i) + message.targetIds[i] = String(object.targetIds[i]); + } return message; }; /** - * Creates a plain object from a GetTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a MultiTarget message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static - * @param {google.cloud.deploy.v1.GetTargetRequest} message GetTargetRequest + * @param {google.cloud.deploy.v1.MultiTarget} message MultiTarget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTargetRequest.toObject = function toObject(message, options) { + MultiTarget.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.arrays || options.defaults) + object.targetIds = []; + if (message.targetIds && message.targetIds.length) { + object.targetIds = []; + for (var j = 0; j < message.targetIds.length; ++j) + object.targetIds[j] = message.targetIds[j]; + } return object; }; /** - * Converts this GetTargetRequest to JSON. + * Converts this MultiTarget to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @instance * @returns {Object.} JSON object */ - GetTargetRequest.prototype.toJSON = function toJSON() { + MultiTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTargetRequest + * Gets the default type url for MultiTarget * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetTargetRequest + * @memberof google.cloud.deploy.v1.MultiTarget * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MultiTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.MultiTarget"; }; - return GetTargetRequest; + return MultiTarget; })(); - v1.CreateTargetRequest = (function() { + v1.ListTargetsRequest = (function() { /** - * Properties of a CreateTargetRequest. + * Properties of a ListTargetsRequest. * @memberof google.cloud.deploy.v1 - * @interface ICreateTargetRequest - * @property {string|null} [parent] CreateTargetRequest parent - * @property {string|null} [targetId] CreateTargetRequest targetId - * @property {google.cloud.deploy.v1.ITarget|null} [target] CreateTargetRequest target - * @property {string|null} [requestId] CreateTargetRequest requestId - * @property {boolean|null} [validateOnly] CreateTargetRequest validateOnly + * @interface IListTargetsRequest + * @property {string|null} [parent] ListTargetsRequest parent + * @property {number|null} [pageSize] ListTargetsRequest pageSize + * @property {string|null} [pageToken] ListTargetsRequest pageToken + * @property {string|null} [filter] ListTargetsRequest filter + * @property {string|null} [orderBy] ListTargetsRequest orderBy */ /** - * Constructs a new CreateTargetRequest. + * Constructs a new ListTargetsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateTargetRequest. - * @implements ICreateTargetRequest + * @classdesc Represents a ListTargetsRequest. + * @implements IListTargetsRequest * @constructor - * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set */ - function CreateTargetRequest(properties) { + function ListTargetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11796,110 +12832,110 @@ } /** - * CreateTargetRequest parent. + * ListTargetsRequest parent. * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - CreateTargetRequest.prototype.parent = ""; + ListTargetsRequest.prototype.parent = ""; /** - * CreateTargetRequest targetId. - * @member {string} targetId - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * ListTargetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - CreateTargetRequest.prototype.targetId = ""; + ListTargetsRequest.prototype.pageSize = 0; /** - * CreateTargetRequest target. - * @member {google.cloud.deploy.v1.ITarget|null|undefined} target - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * ListTargetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - CreateTargetRequest.prototype.target = null; + ListTargetsRequest.prototype.pageToken = ""; /** - * CreateTargetRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * ListTargetsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - CreateTargetRequest.prototype.requestId = ""; + ListTargetsRequest.prototype.filter = ""; /** - * CreateTargetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * ListTargetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance */ - CreateTargetRequest.prototype.validateOnly = false; + ListTargetsRequest.prototype.orderBy = ""; /** - * Creates a new CreateTargetRequest instance using the specified properties. + * Creates a new ListTargetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest instance + * @param {google.cloud.deploy.v1.IListTargetsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest instance */ - CreateTargetRequest.create = function create(properties) { - return new CreateTargetRequest(properties); + ListTargetsRequest.create = function create(properties) { + return new ListTargetsRequest(properties); }; /** - * Encodes the specified CreateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTargetRequest.encode = function encode(message, writer) { + ListTargetsRequest.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.targetId != null && Object.hasOwnProperty.call(message, "targetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsRequest} message ListTargetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTargetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTargetRequest message from the specified reader or buffer. + * Decodes a ListTargetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTargetRequest.decode = function decode(reader, length) { + ListTargetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11908,19 +12944,19 @@ break; } case 2: { - message.targetId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); break; } case 5: { - message.validateOnly = reader.bool(); + message.orderBy = reader.string(); break; } default: @@ -11932,164 +12968,159 @@ }; /** - * Decodes a CreateTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTargetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + ListTargetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTargetRequest message. + * Verifies a ListTargetsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTargetRequest.verify = function verify(message) { + ListTargetsRequest.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.targetId != null && message.hasOwnProperty("targetId")) - if (!$util.isString(message.targetId)) - return "targetId: string expected"; - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.target); - if (error) - return "target." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTargetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsRequest} ListTargetsRequest */ - CreateTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateTargetRequest) + ListTargetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListTargetsRequest) return object; - var message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + var message = new $root.google.cloud.deploy.v1.ListTargetsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.targetId != null) - message.targetId = String(object.targetId); - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateTargetRequest.target: object expected"); - message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTargetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static - * @param {google.cloud.deploy.v1.CreateTargetRequest} message CreateTargetRequest + * @param {google.cloud.deploy.v1.ListTargetsRequest} message ListTargetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTargetRequest.toObject = function toObject(message, options) { + ListTargetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.targetId = ""; - object.target = null; - object.requestId = ""; - object.validateOnly = false; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.targetId != null && message.hasOwnProperty("targetId")) - object.targetId = message.targetId; - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateTargetRequest to JSON. + * Converts this ListTargetsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @instance * @returns {Object.} JSON object */ - CreateTargetRequest.prototype.toJSON = function toJSON() { + ListTargetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTargetRequest + * Gets the default type url for ListTargetsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTargetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsRequest"; }; - return CreateTargetRequest; + return ListTargetsRequest; })(); - v1.UpdateTargetRequest = (function() { + v1.ListTargetsResponse = (function() { /** - * Properties of an UpdateTargetRequest. + * Properties of a ListTargetsResponse. * @memberof google.cloud.deploy.v1 - * @interface IUpdateTargetRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTargetRequest updateMask - * @property {google.cloud.deploy.v1.ITarget|null} [target] UpdateTargetRequest target - * @property {string|null} [requestId] UpdateTargetRequest requestId - * @property {boolean|null} [allowMissing] UpdateTargetRequest allowMissing - * @property {boolean|null} [validateOnly] UpdateTargetRequest validateOnly + * @interface IListTargetsResponse + * @property {Array.|null} [targets] ListTargetsResponse targets + * @property {string|null} [nextPageToken] ListTargetsResponse nextPageToken + * @property {Array.|null} [unreachable] ListTargetsResponse unreachable */ /** - * Constructs a new UpdateTargetRequest. + * Constructs a new ListTargetsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an UpdateTargetRequest. - * @implements IUpdateTargetRequest + * @classdesc Represents a ListTargetsResponse. + * @implements IListTargetsResponse * @constructor - * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set */ - function UpdateTargetRequest(properties) { + function ListTargetsResponse(properties) { + this.targets = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12097,131 +13128,109 @@ } /** - * UpdateTargetRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.deploy.v1.UpdateTargetRequest - * @instance - */ - UpdateTargetRequest.prototype.updateMask = null; - - /** - * UpdateTargetRequest target. - * @member {google.cloud.deploy.v1.ITarget|null|undefined} target - * @memberof google.cloud.deploy.v1.UpdateTargetRequest - * @instance - */ - UpdateTargetRequest.prototype.target = null; - - /** - * UpdateTargetRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsResponse targets. + * @member {Array.} targets + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance */ - UpdateTargetRequest.prototype.requestId = ""; + ListTargetsResponse.prototype.targets = $util.emptyArray; /** - * UpdateTargetRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance */ - UpdateTargetRequest.prototype.allowMissing = false; + ListTargetsResponse.prototype.nextPageToken = ""; /** - * UpdateTargetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * ListTargetsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance */ - UpdateTargetRequest.prototype.validateOnly = false; + ListTargetsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateTargetRequest instance using the specified properties. + * Creates a new ListTargetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest instance + * @param {google.cloud.deploy.v1.IListTargetsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse instance */ - UpdateTargetRequest.create = function create(properties) { - return new UpdateTargetRequest(properties); + ListTargetsResponse.create = function create(properties) { + return new ListTargetsResponse(properties); }; /** - * Encodes the specified UpdateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTargetRequest.encode = function encode(message, writer) { + ListTargetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.cloud.deploy.v1.Target.encode(message.targets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. + * Encodes the specified ListTargetsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListTargetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListTargetsResponse} message ListTargetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListTargetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTargetRequest message from the specified reader or buffer. + * Decodes a ListTargetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTargetRequest.decode = function decode(reader, length) { + ListTargetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); break; } case 2: { - message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.allowMissing = reader.bool(); - break; - } - case 5: { - message.validateOnly = reader.bool(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -12233,169 +13242,169 @@ }; /** - * Decodes an UpdateTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTargetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + ListTargetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTargetRequest message. + * Verifies a ListTargetsResponse message. * @function verify - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTargetRequest.verify = function verify(message) { + ListTargetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.targets[i]); + if (error) + return "targets." + error; + } } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.target); - if (error) - return "target." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: 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 an UpdateTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTargetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest + * @returns {google.cloud.deploy.v1.ListTargetsResponse} ListTargetsResponse */ - UpdateTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.UpdateTargetRequest) + ListTargetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListTargetsResponse) return object; - var message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.deploy.v1.ListTargetsResponse(); + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.targets: object expected"); + message.targets[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targets[i]); + } } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.target: object expected"); - message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListTargetsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); - 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 an UpdateTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListTargetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static - * @param {google.cloud.deploy.v1.UpdateTargetRequest} message UpdateTargetRequest + * @param {google.cloud.deploy.v1.ListTargetsResponse} message ListTargetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTargetRequest.toObject = function toObject(message, options) { + ListTargetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.target = null; - object.requestId = ""; - object.allowMissing = false; - object.validateOnly = false; + if (options.arrays || options.defaults) { + object.targets = []; + object.unreachable = []; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + if (options.defaults) + object.nextPageToken = ""; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; /** - * Converts this UpdateTargetRequest to JSON. + * Converts this ListTargetsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @instance * @returns {Object.} JSON object */ - UpdateTargetRequest.prototype.toJSON = function toJSON() { + ListTargetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTargetRequest + * Gets the default type url for ListTargetsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.UpdateTargetRequest + * @memberof google.cloud.deploy.v1.ListTargetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListTargetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListTargetsResponse"; }; - return UpdateTargetRequest; + return ListTargetsResponse; })(); - v1.DeleteTargetRequest = (function() { + v1.GetTargetRequest = (function() { /** - * Properties of a DeleteTargetRequest. + * Properties of a GetTargetRequest. * @memberof google.cloud.deploy.v1 - * @interface IDeleteTargetRequest - * @property {string|null} [name] DeleteTargetRequest name - * @property {string|null} [requestId] DeleteTargetRequest requestId - * @property {boolean|null} [allowMissing] DeleteTargetRequest allowMissing - * @property {boolean|null} [validateOnly] DeleteTargetRequest validateOnly - * @property {string|null} [etag] DeleteTargetRequest etag + * @interface IGetTargetRequest + * @property {string|null} [name] GetTargetRequest name */ /** - * Constructs a new DeleteTargetRequest. + * Constructs a new GetTargetRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeleteTargetRequest. - * @implements IDeleteTargetRequest + * @classdesc Represents a GetTargetRequest. + * @implements IGetTargetRequest * @constructor - * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set */ - function DeleteTargetRequest(properties) { + function GetTargetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12403,110 +13412,70 @@ } /** - * DeleteTargetRequest name. + * GetTargetRequest name. * @member {string} name - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @instance - */ - DeleteTargetRequest.prototype.name = ""; - - /** - * DeleteTargetRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @instance - */ - DeleteTargetRequest.prototype.requestId = ""; - - /** - * DeleteTargetRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @instance - */ - DeleteTargetRequest.prototype.allowMissing = false; - - /** - * DeleteTargetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.DeleteTargetRequest - * @instance - */ - DeleteTargetRequest.prototype.validateOnly = false; - - /** - * DeleteTargetRequest etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @instance */ - DeleteTargetRequest.prototype.etag = ""; + GetTargetRequest.prototype.name = ""; /** - * Creates a new DeleteTargetRequest instance using the specified properties. + * Creates a new GetTargetRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static - * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest instance + * @param {google.cloud.deploy.v1.IGetTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest instance */ - DeleteTargetRequest.create = function create(properties) { - return new DeleteTargetRequest(properties); + GetTargetRequest.create = function create(properties) { + return new GetTargetRequest(properties); }; /** - * Encodes the specified DeleteTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * Encodes the specified GetTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static - * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTargetRequest.encode = function encode(message, writer) { + GetTargetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - 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); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); return writer; }; /** - * Encodes the specified DeleteTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * Encodes the specified GetTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetTargetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static - * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IGetTargetRequest} message GetTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTargetRequest message from the specified reader or buffer. + * Decodes a GetTargetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTargetRequest.decode = function decode(reader, length) { + GetTargetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetTargetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12514,22 +13483,6 @@ message.name = reader.string(); break; } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.allowMissing = reader.bool(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - case 5: { - message.etag = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -12539,182 +13492,126 @@ }; /** - * Decodes a DeleteTargetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetTargetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTargetRequest.decodeDelimited = function decodeDelimited(reader) { + GetTargetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTargetRequest message. + * Verifies a GetTargetRequest message. * @function verify - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTargetRequest.verify = function verify(message) { + GetTargetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - 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"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a DeleteTargetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetTargetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @returns {google.cloud.deploy.v1.GetTargetRequest} GetTargetRequest */ - DeleteTargetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeleteTargetRequest) + GetTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetTargetRequest) return object; - var message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + var message = new $root.google.cloud.deploy.v1.GetTargetRequest(); if (object.name != null) message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a DeleteTargetRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetTargetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static - * @param {google.cloud.deploy.v1.DeleteTargetRequest} message DeleteTargetRequest + * @param {google.cloud.deploy.v1.GetTargetRequest} message GetTargetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTargetRequest.toObject = function toObject(message, options) { + GetTargetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.requestId = ""; - object.allowMissing = false; - object.validateOnly = false; - object.etag = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this DeleteTargetRequest to JSON. + * Converts this GetTargetRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @instance * @returns {Object.} JSON object */ - DeleteTargetRequest.prototype.toJSON = function toJSON() { + GetTargetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTargetRequest + * Gets the default type url for GetTargetRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @memberof google.cloud.deploy.v1.GetTargetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteTargetRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetTargetRequest"; }; - return DeleteTargetRequest; + return GetTargetRequest; })(); - v1.Release = (function() { + v1.CreateTargetRequest = (function() { /** - * Properties of a Release. + * Properties of a CreateTargetRequest. * @memberof google.cloud.deploy.v1 - * @interface IRelease - * @property {string|null} [name] Release name - * @property {string|null} [uid] Release uid - * @property {string|null} [description] Release description - * @property {Object.|null} [annotations] Release annotations - * @property {Object.|null} [labels] Release labels - * @property {boolean|null} [abandoned] Release abandoned - * @property {google.protobuf.ITimestamp|null} [createTime] Release createTime - * @property {google.protobuf.ITimestamp|null} [renderStartTime] Release renderStartTime - * @property {google.protobuf.ITimestamp|null} [renderEndTime] Release renderEndTime - * @property {string|null} [skaffoldConfigUri] Release skaffoldConfigUri - * @property {string|null} [skaffoldConfigPath] Release skaffoldConfigPath - * @property {Array.|null} [buildArtifacts] Release buildArtifacts - * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipelineSnapshot] Release deliveryPipelineSnapshot - * @property {Array.|null} [targetSnapshots] Release targetSnapshots - * @property {google.cloud.deploy.v1.Release.RenderState|null} [renderState] Release renderState - * @property {string|null} [etag] Release etag - * @property {string|null} [skaffoldVersion] Release skaffoldVersion - * @property {Object.|null} [targetArtifacts] Release targetArtifacts - * @property {Object.|null} [targetRenders] Release targetRenders - * @property {google.cloud.deploy.v1.Release.IReleaseCondition|null} [condition] Release condition - * @property {Object.|null} [deployParameters] Release deployParameters + * @interface ICreateTargetRequest + * @property {string|null} [parent] CreateTargetRequest parent + * @property {string|null} [targetId] CreateTargetRequest targetId + * @property {google.cloud.deploy.v1.ITarget|null} [target] CreateTargetRequest target + * @property {string|null} [requestId] CreateTargetRequest requestId + * @property {boolean|null} [validateOnly] CreateTargetRequest validateOnly */ /** - * Constructs a new Release. + * Constructs a new CreateTargetRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Release. - * @implements IRelease + * @classdesc Represents a CreateTargetRequest. + * @implements ICreateTargetRequest * @constructor - * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set */ - function Release(properties) { - this.annotations = {}; - this.labels = {}; - this.buildArtifacts = []; - this.targetSnapshots = []; - this.targetArtifacts = {}; - this.targetRenders = {}; - this.deployParameters = {}; + function CreateTargetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12722,465 +13619,432 @@ } /** - * Release name. - * @member {string} name - * @memberof google.cloud.deploy.v1.Release - * @instance - */ - Release.prototype.name = ""; - - /** - * Release uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.Release - * @instance - */ - Release.prototype.uid = ""; - - /** - * Release description. - * @member {string} description - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.description = ""; + CreateTargetRequest.prototype.parent = ""; /** - * Release annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.annotations = $util.emptyObject; + CreateTargetRequest.prototype.targetId = ""; /** - * Release labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest target. + * @member {google.cloud.deploy.v1.ITarget|null|undefined} target + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.labels = $util.emptyObject; + CreateTargetRequest.prototype.target = null; /** - * Release abandoned. - * @member {boolean} abandoned - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.abandoned = false; + CreateTargetRequest.prototype.requestId = ""; /** - * Release createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.Release + * CreateTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance */ - Release.prototype.createTime = null; + CreateTargetRequest.prototype.validateOnly = false; /** - * Release renderStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} renderStartTime - * @memberof google.cloud.deploy.v1.Release - * @instance + * Creates a new CreateTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.ICreateTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest instance */ - Release.prototype.renderStartTime = null; + CreateTargetRequest.create = function create(properties) { + return new CreateTargetRequest(properties); + }; /** - * Release renderEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} renderEndTime - * @memberof google.cloud.deploy.v1.Release - * @instance + * Encodes the specified CreateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Release.prototype.renderEndTime = null; + CreateTargetRequest.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.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetId); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; /** - * Release skaffoldConfigUri. - * @member {string} skaffoldConfigUri - * @memberof google.cloud.deploy.v1.Release - * @instance + * Encodes the specified CreateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.ICreateTargetRequest} message CreateTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Release.prototype.skaffoldConfigUri = ""; + CreateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Release skaffoldConfigPath. - * @member {string} skaffoldConfigPath - * @memberof google.cloud.deploy.v1.Release - * @instance + * Decodes a CreateTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.prototype.skaffoldConfigPath = ""; + CreateTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.targetId = reader.string(); + break; + } + case 3: { + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Release buildArtifacts. - * @member {Array.} buildArtifacts - * @memberof google.cloud.deploy.v1.Release - * @instance + * Decodes a CreateTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.prototype.buildArtifacts = $util.emptyArray; + CreateTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Release deliveryPipelineSnapshot. - * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipelineSnapshot - * @memberof google.cloud.deploy.v1.Release - * @instance + * Verifies a CreateTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Release.prototype.deliveryPipelineSnapshot = null; + CreateTargetRequest.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.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.target); + if (error) + return "target." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; /** - * Release targetSnapshots. - * @member {Array.} targetSnapshots - * @memberof google.cloud.deploy.v1.Release - * @instance + * Creates a CreateTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateTargetRequest} CreateTargetRequest */ - Release.prototype.targetSnapshots = $util.emptyArray; - - /** - * Release renderState. - * @member {google.cloud.deploy.v1.Release.RenderState} renderState - * @memberof google.cloud.deploy.v1.Release - * @instance + CreateTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateTargetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateTargetRequest.target: object expected"); + message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {google.cloud.deploy.v1.CreateTargetRequest} message CreateTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Release.prototype.renderState = 0; + CreateTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.targetId = ""; + object.target = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; /** - * Release etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.Release + * Converts this CreateTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateTargetRequest * @instance + * @returns {Object.} JSON object */ - Release.prototype.etag = ""; + CreateTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Release skaffoldVersion. - * @member {string} skaffoldVersion - * @memberof google.cloud.deploy.v1.Release + * Gets the default type url for CreateTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateTargetRequest"; + }; + + return CreateTargetRequest; + })(); + + v1.UpdateTargetRequest = (function() { + + /** + * Properties of an UpdateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IUpdateTargetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTargetRequest updateMask + * @property {google.cloud.deploy.v1.ITarget|null} [target] UpdateTargetRequest target + * @property {string|null} [requestId] UpdateTargetRequest requestId + * @property {boolean|null} [allowMissing] UpdateTargetRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateTargetRequest validateOnly + */ + + /** + * Constructs a new UpdateTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an UpdateTargetRequest. + * @implements IUpdateTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + */ + function UpdateTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateTargetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @instance */ - Release.prototype.skaffoldVersion = ""; + UpdateTargetRequest.prototype.updateMask = null; /** - * Release targetArtifacts. - * @member {Object.} targetArtifacts - * @memberof google.cloud.deploy.v1.Release + * UpdateTargetRequest target. + * @member {google.cloud.deploy.v1.ITarget|null|undefined} target + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @instance */ - Release.prototype.targetArtifacts = $util.emptyObject; + UpdateTargetRequest.prototype.target = null; /** - * Release targetRenders. - * @member {Object.} targetRenders - * @memberof google.cloud.deploy.v1.Release + * UpdateTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @instance */ - Release.prototype.targetRenders = $util.emptyObject; + UpdateTargetRequest.prototype.requestId = ""; /** - * Release condition. - * @member {google.cloud.deploy.v1.Release.IReleaseCondition|null|undefined} condition - * @memberof google.cloud.deploy.v1.Release + * UpdateTargetRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @instance */ - Release.prototype.condition = null; + UpdateTargetRequest.prototype.allowMissing = false; /** - * Release deployParameters. - * @member {Object.} deployParameters - * @memberof google.cloud.deploy.v1.Release + * UpdateTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @instance */ - Release.prototype.deployParameters = $util.emptyObject; + UpdateTargetRequest.prototype.validateOnly = false; /** - * Creates a new Release instance using the specified properties. + * Creates a new UpdateTargetRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static - * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release} Release instance + * @param {google.cloud.deploy.v1.IUpdateTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest instance */ - Release.create = function create(properties) { - return new Release(properties); + UpdateTargetRequest.create = function create(properties) { + return new UpdateTargetRequest(properties); }; /** - * Encodes the specified Release message. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * Encodes the specified UpdateTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static - * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Release.encode = function encode(message, writer) { + UpdateTargetRequest.encode = function encode(message, writer) { 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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - 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.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.renderStartTime != null && Object.hasOwnProperty.call(message, "renderStartTime")) - $root.google.protobuf.Timestamp.encode(message.renderStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.renderEndTime != null && Object.hasOwnProperty.call(message, "renderEndTime")) - $root.google.protobuf.Timestamp.encode(message.renderEndTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.skaffoldConfigPath); - if (message.buildArtifacts != null && message.buildArtifacts.length) - for (var i = 0; i < message.buildArtifacts.length; ++i) - $root.google.cloud.deploy.v1.BuildArtifact.encode(message.buildArtifacts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.deliveryPipelineSnapshot != null && Object.hasOwnProperty.call(message, "deliveryPipelineSnapshot")) - $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelineSnapshot, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.targetSnapshots != null && message.targetSnapshots.length) - for (var i = 0; i < message.targetSnapshots.length; ++i) - $root.google.cloud.deploy.v1.Target.encode(message.targetSnapshots[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.renderState != null && Object.hasOwnProperty.call(message, "renderState")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.renderState); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); - if (message.skaffoldConfigUri != null && Object.hasOwnProperty.call(message, "skaffoldConfigUri")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.skaffoldConfigUri); - if (message.skaffoldVersion != null && Object.hasOwnProperty.call(message, "skaffoldVersion")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.skaffoldVersion); - if (message.targetArtifacts != null && Object.hasOwnProperty.call(message, "targetArtifacts")) - for (var keys = Object.keys(message.targetArtifacts), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.deploy.v1.TargetArtifact.encode(message.targetArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.targetRenders != null && Object.hasOwnProperty.call(message, "targetRenders")) - for (var keys = Object.keys(message.targetRenders), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.deploy.v1.Release.TargetRender.encode(message.targetRenders[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.abandoned != null && Object.hasOwnProperty.call(message, "abandoned")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.abandoned); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.cloud.deploy.v1.Release.ReleaseCondition.encode(message.condition, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.deployParameters != null && Object.hasOwnProperty.call(message, "deployParameters")) - for (var keys = Object.keys(message.deployParameters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 25, wireType 2 =*/202).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.deployParameters[keys[i]]).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.deploy.v1.Target.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified Release message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * Encodes the specified UpdateTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateTargetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static - * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {google.cloud.deploy.v1.IUpdateTargetRequest} message UpdateTargetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Release.encodeDelimited = function encodeDelimited(message, writer) { + UpdateTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Release message from the specified reader or buffer. + * Decodes an UpdateTargetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release} Release + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.decode = function decode(reader, length) { + UpdateTargetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.uid = reader.string(); + message.target = $root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32()); break; } case 3: { - message.description = reader.string(); + message.requestId = 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; + message.allowMissing = reader.bool(); break; } case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 23: { - message.abandoned = reader.bool(); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.skaffoldConfigUri = reader.string(); - break; - } - case 9: { - message.skaffoldConfigPath = reader.string(); - break; - } - case 10: { - if (!(message.buildArtifacts && message.buildArtifacts.length)) - message.buildArtifacts = []; - message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); - break; - } - case 11: { - message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.targetSnapshots && message.targetSnapshots.length)) - message.targetSnapshots = []; - message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); - break; - } - case 13: { - message.renderState = reader.int32(); - break; - } - case 16: { - message.etag = reader.string(); - break; - } - case 19: { - message.skaffoldVersion = reader.string(); - break; - } - case 20: { - if (message.targetArtifacts === $util.emptyObject) - message.targetArtifacts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.targetArtifacts[key] = value; - break; - } - case 22: { - if (message.targetRenders === $util.emptyObject) - message.targetRenders = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.targetRenders[key] = value; - break; - } - case 24: { - message.condition = $root.google.cloud.deploy.v1.Release.ReleaseCondition.decode(reader, reader.uint32()); - break; - } - case 25: { - if (message.deployParameters === $util.emptyObject) - message.deployParameters = {}; - 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.deployParameters[key] = value; + message.validateOnly = reader.bool(); break; } default: @@ -13192,1624 +14056,10946 @@ }; /** - * Decodes a Release message from the specified reader or buffer, length delimited. + * Decodes an UpdateTargetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release} Release + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Release.decodeDelimited = function decodeDelimited(reader) { + UpdateTargetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Release message. + * Verifies an UpdateTargetRequest message. * @function verify - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Release.verify = function verify(message) { + UpdateTargetRequest.verify = function verify(message) { if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: 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.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.abandoned != null && message.hasOwnProperty("abandoned")) - if (typeof message.abandoned !== "boolean") - return "abandoned: boolean expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.renderStartTime); - if (error) - return "renderStartTime." + error; - } - if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.renderEndTime); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "renderEndTime." + error; - } - if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) - if (!$util.isString(message.skaffoldConfigUri)) - return "skaffoldConfigUri: string expected"; - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - if (!$util.isString(message.skaffoldConfigPath)) - return "skaffoldConfigPath: string expected"; - if (message.buildArtifacts != null && message.hasOwnProperty("buildArtifacts")) { - if (!Array.isArray(message.buildArtifacts)) - return "buildArtifacts: array expected"; - for (var i = 0; i < message.buildArtifacts.length; ++i) { - var error = $root.google.cloud.deploy.v1.BuildArtifact.verify(message.buildArtifacts[i]); - if (error) - return "buildArtifacts." + error; - } + return "updateMask." + error; } - if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) { - var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelineSnapshot); + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.target); if (error) - return "deliveryPipelineSnapshot." + error; - } - if (message.targetSnapshots != null && message.hasOwnProperty("targetSnapshots")) { - if (!Array.isArray(message.targetSnapshots)) - return "targetSnapshots: array expected"; - for (var i = 0; i < message.targetSnapshots.length; ++i) { - var error = $root.google.cloud.deploy.v1.Target.verify(message.targetSnapshots[i]); - if (error) - return "targetSnapshots." + error; - } - } - if (message.renderState != null && message.hasOwnProperty("renderState")) - switch (message.renderState) { - default: - return "renderState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) - if (!$util.isString(message.skaffoldVersion)) - return "skaffoldVersion: string expected"; - if (message.targetArtifacts != null && message.hasOwnProperty("targetArtifacts")) { - if (!$util.isObject(message.targetArtifacts)) - return "targetArtifacts: object expected"; - var key = Object.keys(message.targetArtifacts); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.deploy.v1.TargetArtifact.verify(message.targetArtifacts[key[i]]); - if (error) - return "targetArtifacts." + error; - } - } - if (message.targetRenders != null && message.hasOwnProperty("targetRenders")) { - if (!$util.isObject(message.targetRenders)) - return "targetRenders: object expected"; - var key = Object.keys(message.targetRenders); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.deploy.v1.Release.TargetRender.verify(message.targetRenders[key[i]]); - if (error) - return "targetRenders." + error; - } - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.cloud.deploy.v1.Release.ReleaseCondition.verify(message.condition); - if (error) - return "condition." + error; - } - if (message.deployParameters != null && message.hasOwnProperty("deployParameters")) { - if (!$util.isObject(message.deployParameters)) - return "deployParameters: object expected"; - var key = Object.keys(message.deployParameters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.deployParameters[key[i]])) - return "deployParameters: string{k:string} expected"; + return "target." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: 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 Release message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateTargetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release} Release + * @returns {google.cloud.deploy.v1.UpdateTargetRequest} UpdateTargetRequest */ - Release.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release) + UpdateTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.UpdateTargetRequest) return object; - var message = new $root.google.cloud.deploy.v1.Release(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.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.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.abandoned != null) - message.abandoned = Boolean(object.abandoned); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.renderStartTime != null) { - if (typeof object.renderStartTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.renderStartTime: object expected"); - message.renderStartTime = $root.google.protobuf.Timestamp.fromObject(object.renderStartTime); - } - if (object.renderEndTime != null) { - if (typeof object.renderEndTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.renderEndTime: object expected"); - message.renderEndTime = $root.google.protobuf.Timestamp.fromObject(object.renderEndTime); - } - if (object.skaffoldConfigUri != null) - message.skaffoldConfigUri = String(object.skaffoldConfigUri); - if (object.skaffoldConfigPath != null) - message.skaffoldConfigPath = String(object.skaffoldConfigPath); - if (object.buildArtifacts) { - if (!Array.isArray(object.buildArtifacts)) - throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: array expected"); - message.buildArtifacts = []; - for (var i = 0; i < object.buildArtifacts.length; ++i) { - if (typeof object.buildArtifacts[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: object expected"); - message.buildArtifacts[i] = $root.google.cloud.deploy.v1.BuildArtifact.fromObject(object.buildArtifacts[i]); - } - } - if (object.deliveryPipelineSnapshot != null) { - if (typeof object.deliveryPipelineSnapshot !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.deliveryPipelineSnapshot: object expected"); - message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelineSnapshot); - } - if (object.targetSnapshots) { - if (!Array.isArray(object.targetSnapshots)) - throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: array expected"); - message.targetSnapshots = []; - for (var i = 0; i < object.targetSnapshots.length; ++i) { - if (typeof object.targetSnapshots[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: object expected"); - message.targetSnapshots[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targetSnapshots[i]); - } - } - switch (object.renderState) { - default: - if (typeof object.renderState === "number") { - message.renderState = object.renderState; - break; - } - break; - case "RENDER_STATE_UNSPECIFIED": - case 0: - message.renderState = 0; - break; - case "SUCCEEDED": - case 1: - message.renderState = 1; - break; - case "FAILED": - case 2: - message.renderState = 2; - break; - case "IN_PROGRESS": - case 3: - message.renderState = 3; - break; - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.skaffoldVersion != null) - message.skaffoldVersion = String(object.skaffoldVersion); - if (object.targetArtifacts) { - if (typeof object.targetArtifacts !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); - message.targetArtifacts = {}; - for (var keys = Object.keys(object.targetArtifacts), i = 0; i < keys.length; ++i) { - if (typeof object.targetArtifacts[keys[i]] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); - message.targetArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.fromObject(object.targetArtifacts[keys[i]]); - } - } - if (object.targetRenders) { - if (typeof object.targetRenders !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); - message.targetRenders = {}; - for (var keys = Object.keys(object.targetRenders), i = 0; i < keys.length; ++i) { - if (typeof object.targetRenders[keys[i]] !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); - message.targetRenders[keys[i]] = $root.google.cloud.deploy.v1.Release.TargetRender.fromObject(object.targetRenders[keys[i]]); - } - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.condition: object expected"); - message.condition = $root.google.cloud.deploy.v1.Release.ReleaseCondition.fromObject(object.condition); + var message = new $root.google.cloud.deploy.v1.UpdateTargetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.deployParameters) { - if (typeof object.deployParameters !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.deployParameters: object expected"); - message.deployParameters = {}; - for (var keys = Object.keys(object.deployParameters), i = 0; i < keys.length; ++i) - message.deployParameters[keys[i]] = String(object.deployParameters[keys[i]]); + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateTargetRequest.target: object expected"); + message.target = $root.google.cloud.deploy.v1.Target.fromObject(object.target); } + if (object.requestId != null) + message.requestId = String(object.requestId); + 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 Release message. Also converts values to other types if specified. + * Creates a plain object from an UpdateTargetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static - * @param {google.cloud.deploy.v1.Release} message Release + * @param {google.cloud.deploy.v1.UpdateTargetRequest} message UpdateTargetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Release.toObject = function toObject(message, options) { + UpdateTargetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.buildArtifacts = []; - object.targetSnapshots = []; - } - if (options.objects || options.defaults) { - object.annotations = {}; - object.labels = {}; - object.targetArtifacts = {}; - object.targetRenders = {}; - object.deployParameters = {}; - } if (options.defaults) { - object.name = ""; - object.uid = ""; - object.description = ""; - object.createTime = null; - object.renderStartTime = null; - object.renderEndTime = null; - object.skaffoldConfigPath = ""; - object.deliveryPipelineSnapshot = null; - object.renderState = options.enums === String ? "RENDER_STATE_UNSPECIFIED" : 0; - object.etag = ""; - object.skaffoldConfigUri = ""; - object.skaffoldVersion = ""; - object.abandoned = false; - object.condition = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) - object.renderStartTime = $root.google.protobuf.Timestamp.toObject(message.renderStartTime, options); - if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) - object.renderEndTime = $root.google.protobuf.Timestamp.toObject(message.renderEndTime, options); - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - object.skaffoldConfigPath = message.skaffoldConfigPath; - if (message.buildArtifacts && message.buildArtifacts.length) { - object.buildArtifacts = []; - for (var j = 0; j < message.buildArtifacts.length; ++j) - object.buildArtifacts[j] = $root.google.cloud.deploy.v1.BuildArtifact.toObject(message.buildArtifacts[j], options); - } - if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) - object.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelineSnapshot, options); - if (message.targetSnapshots && message.targetSnapshots.length) { - object.targetSnapshots = []; - for (var j = 0; j < message.targetSnapshots.length; ++j) - object.targetSnapshots[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targetSnapshots[j], options); - } - if (message.renderState != null && message.hasOwnProperty("renderState")) - object.renderState = options.enums === String ? $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] === undefined ? message.renderState : $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] : message.renderState; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) - object.skaffoldConfigUri = message.skaffoldConfigUri; - if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) - object.skaffoldVersion = message.skaffoldVersion; - if (message.targetArtifacts && (keys2 = Object.keys(message.targetArtifacts)).length) { - object.targetArtifacts = {}; - for (var j = 0; j < keys2.length; ++j) - object.targetArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.toObject(message.targetArtifacts[keys2[j]], options); - } - if (message.targetRenders && (keys2 = Object.keys(message.targetRenders)).length) { - object.targetRenders = {}; - for (var j = 0; j < keys2.length; ++j) - object.targetRenders[keys2[j]] = $root.google.cloud.deploy.v1.Release.TargetRender.toObject(message.targetRenders[keys2[j]], options); - } - if (message.abandoned != null && message.hasOwnProperty("abandoned")) - object.abandoned = message.abandoned; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.cloud.deploy.v1.Release.ReleaseCondition.toObject(message.condition, options); - if (message.deployParameters && (keys2 = Object.keys(message.deployParameters)).length) { - object.deployParameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.deployParameters[keys2[j]] = message.deployParameters[keys2[j]]; + object.updateMask = null; + object.target = null; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.deploy.v1.Target.toObject(message.target, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + 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 Release to JSON. + * Converts this UpdateTargetRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @instance * @returns {Object.} JSON object */ - Release.prototype.toJSON = function toJSON() { + UpdateTargetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Release + * Gets the default type url for UpdateTargetRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release + * @memberof google.cloud.deploy.v1.UpdateTargetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Release.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release"; + return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateTargetRequest"; }; + return UpdateTargetRequest; + })(); + + v1.DeleteTargetRequest = (function() { + /** - * RenderState enum. - * @name google.cloud.deploy.v1.Release.RenderState - * @enum {number} - * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * Properties of a DeleteTargetRequest. + * @memberof google.cloud.deploy.v1 + * @interface IDeleteTargetRequest + * @property {string|null} [name] DeleteTargetRequest name + * @property {string|null} [requestId] DeleteTargetRequest requestId + * @property {boolean|null} [allowMissing] DeleteTargetRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteTargetRequest validateOnly + * @property {string|null} [etag] DeleteTargetRequest etag */ - Release.RenderState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - return values; - })(); - Release.TargetRender = (function() { + /** + * Constructs a new DeleteTargetRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeleteTargetRequest. + * @implements IDeleteTargetRequest + * @constructor + * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + */ + function DeleteTargetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a TargetRender. - * @memberof google.cloud.deploy.v1.Release - * @interface ITargetRender - * @property {string|null} [renderingBuild] TargetRender renderingBuild - * @property {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null} [renderingState] TargetRender renderingState - * @property {google.cloud.deploy.v1.IRenderMetadata|null} [metadata] TargetRender metadata - * @property {google.cloud.deploy.v1.Release.TargetRender.FailureCause|null} [failureCause] TargetRender failureCause - * @property {string|null} [failureMessage] TargetRender failureMessage - */ + /** + * DeleteTargetRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.name = ""; - /** - * Constructs a new TargetRender. - * @memberof google.cloud.deploy.v1.Release - * @classdesc Represents a TargetRender. - * @implements ITargetRender - * @constructor - * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set - */ - function TargetRender(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DeleteTargetRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.requestId = ""; - /** - * TargetRender renderingBuild. - * @member {string} renderingBuild - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.renderingBuild = ""; + /** + * DeleteTargetRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.allowMissing = false; - /** - * TargetRender renderingState. - * @member {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState} renderingState - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.renderingState = 0; + /** + * DeleteTargetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.validateOnly = false; - /** - * TargetRender metadata. - * @member {google.cloud.deploy.v1.IRenderMetadata|null|undefined} metadata - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.metadata = null; + /** + * DeleteTargetRequest etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + */ + DeleteTargetRequest.prototype.etag = ""; - /** - * TargetRender failureCause. - * @member {google.cloud.deploy.v1.Release.TargetRender.FailureCause} failureCause - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.failureCause = 0; + /** + * Creates a new DeleteTargetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest instance + */ + DeleteTargetRequest.create = function create(properties) { + return new DeleteTargetRequest(properties); + }; - /** - * TargetRender failureMessage. - * @member {string} failureMessage - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - */ - TargetRender.prototype.failureMessage = ""; + /** + * Encodes the specified DeleteTargetRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTargetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + 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); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + return writer; + }; - /** - * Creates a new TargetRender instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender instance - */ - TargetRender.create = function create(properties) { - return new TargetRender(properties); - }; - - /** - * Encodes the specified TargetRender message. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetRender.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.renderingBuild != null && Object.hasOwnProperty.call(message, "renderingBuild")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.renderingBuild); - if (message.renderingState != null && Object.hasOwnProperty.call(message, "renderingState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.renderingState); - if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); - if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.failureMessage); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.deploy.v1.RenderMetadata.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TargetRender message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetRender.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteTargetRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteTargetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.IDeleteTargetRequest} message DeleteTargetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTargetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TargetRender message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetRender.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.TargetRender(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.renderingBuild = reader.string(); - break; - } - case 2: { - message.renderingState = reader.int32(); - break; - } - case 6: { - message.metadata = $root.google.cloud.deploy.v1.RenderMetadata.decode(reader, reader.uint32()); - break; - } - case 4: { - message.failureCause = reader.int32(); - break; - } - case 5: { - message.failureMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTargetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a TargetRender message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetRender.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetRender message. - * @function verify - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetRender.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) - if (!$util.isString(message.renderingBuild)) - return "renderingBuild: string expected"; - if (message.renderingState != null && message.hasOwnProperty("renderingState")) - switch (message.renderingState) { - default: - return "renderingState: enum value expected"; - case 0: - case 1: - case 2: - case 3: + case 2: { + message.requestId = reader.string(); break; } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.cloud.deploy.v1.RenderMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - switch (message.failureCause) { - default: - return "failureCause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: + case 3: { + message.allowMissing = reader.bool(); break; } - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - if (!$util.isString(message.failureMessage)) - return "failureMessage: string expected"; - return null; - }; - - /** - * Creates a TargetRender message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender - */ - TargetRender.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release.TargetRender) - return object; - var message = new $root.google.cloud.deploy.v1.Release.TargetRender(); - if (object.renderingBuild != null) - message.renderingBuild = String(object.renderingBuild); - switch (object.renderingState) { - default: - if (typeof object.renderingState === "number") { - message.renderingState = object.renderingState; + case 4: { + message.validateOnly = reader.bool(); break; } - break; - case "TARGET_RENDER_STATE_UNSPECIFIED": - case 0: - message.renderingState = 0; - break; - case "SUCCEEDED": - case 1: - message.renderingState = 1; - break; - case "FAILED": - case 2: - message.renderingState = 2; - break; - case "IN_PROGRESS": - case 3: - message.renderingState = 3; - break; - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.TargetRender.metadata: object expected"); - message.metadata = $root.google.cloud.deploy.v1.RenderMetadata.fromObject(object.metadata); - } - switch (object.failureCause) { - default: - if (typeof object.failureCause === "number") { - message.failureCause = object.failureCause; + case 5: { + message.etag = reader.string(); break; } - break; - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.failureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.failureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.failureCause = 2; - break; - case "CLOUD_BUILD_REQUEST_FAILED": - case 3: - message.failureCause = 3; - break; - case "CUSTOM_ACTION_NOT_FOUND": - case 5: - message.failureCause = 5; + default: + reader.skipType(tag & 7); break; } - if (object.failureMessage != null) - message.failureMessage = String(object.failureMessage); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a TargetRender message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {google.cloud.deploy.v1.Release.TargetRender} message TargetRender - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetRender.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.renderingBuild = ""; - object.renderingState = options.enums === String ? "TARGET_RENDER_STATE_UNSPECIFIED" : 0; - object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - object.failureMessage = ""; - object.metadata = null; - } - if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) - object.renderingBuild = message.renderingBuild; - if (message.renderingState != null && message.hasOwnProperty("renderingState")) - object.renderingState = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] === undefined ? message.renderingState : $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] : message.renderingState; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] : message.failureCause; - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - object.failureMessage = message.failureMessage; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.deploy.v1.RenderMetadata.toObject(message.metadata, options); - return object; - }; + /** + * Decodes a DeleteTargetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTargetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this TargetRender to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @instance - * @returns {Object.} JSON object - */ - TargetRender.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a DeleteTargetRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTargetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + 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"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; - /** - * Gets the default type url for TargetRender - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release.TargetRender - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetRender.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release.TargetRender"; - }; + /** + * Creates a DeleteTargetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeleteTargetRequest} DeleteTargetRequest + */ + DeleteTargetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeleteTargetRequest) + return object; + var message = new $root.google.cloud.deploy.v1.DeleteTargetRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; - /** - * TargetRenderState enum. - * @name google.cloud.deploy.v1.Release.TargetRender.TargetRenderState - * @enum {number} - * @property {number} TARGET_RENDER_STATE_UNSPECIFIED=0 TARGET_RENDER_STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value - */ - TargetRender.TargetRenderState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_RENDER_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - return values; - })(); + /** + * Creates a plain object from a DeleteTargetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {google.cloud.deploy.v1.DeleteTargetRequest} message DeleteTargetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTargetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.Release.TargetRender.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} CLOUD_BUILD_REQUEST_FAILED=3 CLOUD_BUILD_REQUEST_FAILED value - * @property {number} CUSTOM_ACTION_NOT_FOUND=5 CUSTOM_ACTION_NOT_FOUND value - */ - TargetRender.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "CLOUD_BUILD_REQUEST_FAILED"] = 3; - values[valuesById[5] = "CUSTOM_ACTION_NOT_FOUND"] = 5; - return values; - })(); + /** + * Converts this DeleteTargetRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTargetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return TargetRender; - })(); + /** + * Gets the default type url for DeleteTargetRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeleteTargetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTargetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteTargetRequest"; + }; - Release.ReleaseReadyCondition = (function() { + return DeleteTargetRequest; + })(); - /** - * Properties of a ReleaseReadyCondition. - * @memberof google.cloud.deploy.v1.Release - * @interface IReleaseReadyCondition - * @property {boolean|null} [status] ReleaseReadyCondition status - */ + v1.TargetAttribute = (function() { - /** - * Constructs a new ReleaseReadyCondition. - * @memberof google.cloud.deploy.v1.Release - * @classdesc Represents a ReleaseReadyCondition. - * @implements IReleaseReadyCondition - * @constructor - * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition=} [properties] Properties to set - */ - function ReleaseReadyCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a TargetAttribute. + * @memberof google.cloud.deploy.v1 + * @interface ITargetAttribute + * @property {string|null} [id] TargetAttribute id + * @property {Object.|null} [labels] TargetAttribute labels + */ - /** - * ReleaseReadyCondition status. - * @member {boolean} status - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @instance - */ - ReleaseReadyCondition.prototype.status = false; + /** + * Constructs a new TargetAttribute. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a TargetAttribute. + * @implements ITargetAttribute + * @constructor + * @param {google.cloud.deploy.v1.ITargetAttribute=} [properties] Properties to set + */ + function TargetAttribute(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ReleaseReadyCondition instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition instance - */ - ReleaseReadyCondition.create = function create(properties) { - return new ReleaseReadyCondition(properties); - }; + /** + * TargetAttribute id. + * @member {string} id + * @memberof google.cloud.deploy.v1.TargetAttribute + * @instance + */ + TargetAttribute.prototype.id = ""; - /** - * Encodes the specified ReleaseReadyCondition message. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseReadyCondition.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition} message ReleaseReadyCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseReadyCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); - return writer; - }; + /** + * TargetAttribute labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.TargetAttribute + * @instance + */ + TargetAttribute.prototype.labels = $util.emptyObject; - /** - * Encodes the specified ReleaseReadyCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseReadyCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition} message ReleaseReadyCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseReadyCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new TargetAttribute instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {google.cloud.deploy.v1.ITargetAttribute=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetAttribute} TargetAttribute instance + */ + TargetAttribute.create = function create(properties) { + return new TargetAttribute(properties); + }; - /** - * Decodes a ReleaseReadyCondition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseReadyCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.status = reader.bool(); - break; + /** + * Encodes the specified TargetAttribute message. Does not implicitly {@link google.cloud.deploy.v1.TargetAttribute.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {google.cloud.deploy.v1.ITargetAttribute} message TargetAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetAttribute.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.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetAttribute message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {google.cloud.deploy.v1.ITargetAttribute} message TargetAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetAttribute} TargetAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetAttribute(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - default: - reader.skipType(tag & 7); + message.labels[key] = value; break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ReleaseReadyCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseReadyCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ReleaseReadyCondition message. - * @function verify - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseReadyCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (typeof message.status !== "boolean") - return "status: boolean expected"; - return null; - }; + /** + * Decodes a TargetAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetAttribute} TargetAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ReleaseReadyCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition - */ - ReleaseReadyCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition) - return object; - var message = new $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition(); - if (object.status != null) - message.status = Boolean(object.status); - return message; - }; + /** + * Verifies a TargetAttribute message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetAttribute.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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; - /** - * Creates a plain object from a ReleaseReadyCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {google.cloud.deploy.v1.Release.ReleaseReadyCondition} message ReleaseReadyCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseReadyCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.status = false; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; + /** + * Creates a TargetAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetAttribute} TargetAttribute + */ + TargetAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetAttribute) return object; - }; + var message = new $root.google.cloud.deploy.v1.TargetAttribute(); + if (object.id != null) + message.id = String(object.id); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.TargetAttribute.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; - /** - * Converts this ReleaseReadyCondition to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @instance - * @returns {Object.} JSON object - */ - ReleaseReadyCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a TargetAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {google.cloud.deploy.v1.TargetAttribute} message TargetAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; - /** - * Gets the default type url for ReleaseReadyCondition - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReleaseReadyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release.ReleaseReadyCondition"; - }; + /** + * Converts this TargetAttribute to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetAttribute + * @instance + * @returns {Object.} JSON object + */ + TargetAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ReleaseReadyCondition; - })(); + /** + * Gets the default type url for TargetAttribute + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetAttribute"; + }; - Release.SkaffoldSupportedCondition = (function() { + return TargetAttribute; + })(); - /** - * Properties of a SkaffoldSupportedCondition. - * @memberof google.cloud.deploy.v1.Release - * @interface ISkaffoldSupportedCondition - * @property {boolean|null} [status] SkaffoldSupportedCondition status - * @property {google.cloud.deploy.v1.SkaffoldSupportState|null} [skaffoldSupportState] SkaffoldSupportedCondition skaffoldSupportState - * @property {google.protobuf.ITimestamp|null} [maintenanceModeTime] SkaffoldSupportedCondition maintenanceModeTime - * @property {google.protobuf.ITimestamp|null} [supportExpirationTime] SkaffoldSupportedCondition supportExpirationTime - */ + v1.Release = (function() { - /** - * Constructs a new SkaffoldSupportedCondition. - * @memberof google.cloud.deploy.v1.Release - * @classdesc Represents a SkaffoldSupportedCondition. - * @implements ISkaffoldSupportedCondition - * @constructor - * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition=} [properties] Properties to set - */ - function SkaffoldSupportedCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a Release. + * @memberof google.cloud.deploy.v1 + * @interface IRelease + * @property {string|null} [name] Release name + * @property {string|null} [uid] Release uid + * @property {string|null} [description] Release description + * @property {Object.|null} [annotations] Release annotations + * @property {Object.|null} [labels] Release labels + * @property {boolean|null} [abandoned] Release abandoned + * @property {google.protobuf.ITimestamp|null} [createTime] Release createTime + * @property {google.protobuf.ITimestamp|null} [renderStartTime] Release renderStartTime + * @property {google.protobuf.ITimestamp|null} [renderEndTime] Release renderEndTime + * @property {string|null} [skaffoldConfigUri] Release skaffoldConfigUri + * @property {string|null} [skaffoldConfigPath] Release skaffoldConfigPath + * @property {Array.|null} [buildArtifacts] Release buildArtifacts + * @property {google.cloud.deploy.v1.IDeliveryPipeline|null} [deliveryPipelineSnapshot] Release deliveryPipelineSnapshot + * @property {Array.|null} [targetSnapshots] Release targetSnapshots + * @property {google.cloud.deploy.v1.Release.RenderState|null} [renderState] Release renderState + * @property {string|null} [etag] Release etag + * @property {string|null} [skaffoldVersion] Release skaffoldVersion + * @property {Object.|null} [targetArtifacts] Release targetArtifacts + * @property {Object.|null} [targetRenders] Release targetRenders + * @property {google.cloud.deploy.v1.Release.IReleaseCondition|null} [condition] Release condition + * @property {Object.|null} [deployParameters] Release deployParameters + */ - /** - * SkaffoldSupportedCondition status. - * @member {boolean} status - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @instance - */ - SkaffoldSupportedCondition.prototype.status = false; + /** + * Constructs a new Release. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Release. + * @implements IRelease + * @constructor + * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + */ + function Release(properties) { + this.annotations = {}; + this.labels = {}; + this.buildArtifacts = []; + this.targetSnapshots = []; + this.targetArtifacts = {}; + this.targetRenders = {}; + this.deployParameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SkaffoldSupportedCondition skaffoldSupportState. - * @member {google.cloud.deploy.v1.SkaffoldSupportState} skaffoldSupportState - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @instance - */ - SkaffoldSupportedCondition.prototype.skaffoldSupportState = 0; + /** + * Release name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.name = ""; - /** - * SkaffoldSupportedCondition maintenanceModeTime. - * @member {google.protobuf.ITimestamp|null|undefined} maintenanceModeTime - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @instance - */ - SkaffoldSupportedCondition.prototype.maintenanceModeTime = null; + /** + * Release uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.uid = ""; - /** - * SkaffoldSupportedCondition supportExpirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} supportExpirationTime - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @instance - */ - SkaffoldSupportedCondition.prototype.supportExpirationTime = null; + /** + * Release description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.description = ""; - /** - * Creates a new SkaffoldSupportedCondition instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition instance - */ - SkaffoldSupportedCondition.create = function create(properties) { - return new SkaffoldSupportedCondition(properties); - }; + /** + * Release annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.annotations = $util.emptyObject; - /** - * Encodes the specified SkaffoldSupportedCondition message. Does not implicitly {@link google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition} message SkaffoldSupportedCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SkaffoldSupportedCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); - if (message.skaffoldSupportState != null && Object.hasOwnProperty.call(message, "skaffoldSupportState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.skaffoldSupportState); - if (message.maintenanceModeTime != null && Object.hasOwnProperty.call(message, "maintenanceModeTime")) - $root.google.protobuf.Timestamp.encode(message.maintenanceModeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.supportExpirationTime != null && Object.hasOwnProperty.call(message, "supportExpirationTime")) - $root.google.protobuf.Timestamp.encode(message.supportExpirationTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Release labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.labels = $util.emptyObject; - /** - * Encodes the specified SkaffoldSupportedCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition} message SkaffoldSupportedCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SkaffoldSupportedCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Release abandoned. + * @member {boolean} abandoned + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.abandoned = false; - /** - * Decodes a SkaffoldSupportedCondition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SkaffoldSupportedCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.status = reader.bool(); - break; + /** + * Release createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.createTime = null; + + /** + * Release renderStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} renderStartTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderStartTime = null; + + /** + * Release renderEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} renderEndTime + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderEndTime = null; + + /** + * Release skaffoldConfigUri. + * @member {string} skaffoldConfigUri + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldConfigUri = ""; + + /** + * Release skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldConfigPath = ""; + + /** + * Release buildArtifacts. + * @member {Array.} buildArtifacts + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.buildArtifacts = $util.emptyArray; + + /** + * Release deliveryPipelineSnapshot. + * @member {google.cloud.deploy.v1.IDeliveryPipeline|null|undefined} deliveryPipelineSnapshot + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.deliveryPipelineSnapshot = null; + + /** + * Release targetSnapshots. + * @member {Array.} targetSnapshots + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetSnapshots = $util.emptyArray; + + /** + * Release renderState. + * @member {google.cloud.deploy.v1.Release.RenderState} renderState + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.renderState = 0; + + /** + * Release etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.etag = ""; + + /** + * Release skaffoldVersion. + * @member {string} skaffoldVersion + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.skaffoldVersion = ""; + + /** + * Release targetArtifacts. + * @member {Object.} targetArtifacts + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetArtifacts = $util.emptyObject; + + /** + * Release targetRenders. + * @member {Object.} targetRenders + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.targetRenders = $util.emptyObject; + + /** + * Release condition. + * @member {google.cloud.deploy.v1.Release.IReleaseCondition|null|undefined} condition + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.condition = null; + + /** + * Release deployParameters. + * @member {Object.} deployParameters + * @memberof google.cloud.deploy.v1.Release + * @instance + */ + Release.prototype.deployParameters = $util.emptyObject; + + /** + * Creates a new Release instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release} Release instance + */ + Release.create = function create(properties) { + return new Release(properties); + }; + + /** + * Encodes the specified Release message. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Release.encode = function encode(message, writer) { + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + 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.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.renderStartTime != null && Object.hasOwnProperty.call(message, "renderStartTime")) + $root.google.protobuf.Timestamp.encode(message.renderStartTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.renderEndTime != null && Object.hasOwnProperty.call(message, "renderEndTime")) + $root.google.protobuf.Timestamp.encode(message.renderEndTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.skaffoldConfigPath); + if (message.buildArtifacts != null && message.buildArtifacts.length) + for (var i = 0; i < message.buildArtifacts.length; ++i) + $root.google.cloud.deploy.v1.BuildArtifact.encode(message.buildArtifacts[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.deliveryPipelineSnapshot != null && Object.hasOwnProperty.call(message, "deliveryPipelineSnapshot")) + $root.google.cloud.deploy.v1.DeliveryPipeline.encode(message.deliveryPipelineSnapshot, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.targetSnapshots != null && message.targetSnapshots.length) + for (var i = 0; i < message.targetSnapshots.length; ++i) + $root.google.cloud.deploy.v1.Target.encode(message.targetSnapshots[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.renderState != null && Object.hasOwnProperty.call(message, "renderState")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.renderState); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + if (message.skaffoldConfigUri != null && Object.hasOwnProperty.call(message, "skaffoldConfigUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.skaffoldConfigUri); + if (message.skaffoldVersion != null && Object.hasOwnProperty.call(message, "skaffoldVersion")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.skaffoldVersion); + if (message.targetArtifacts != null && Object.hasOwnProperty.call(message, "targetArtifacts")) + for (var keys = Object.keys(message.targetArtifacts), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 20, wireType 2 =*/162).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.TargetArtifact.encode(message.targetArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.targetRenders != null && Object.hasOwnProperty.call(message, "targetRenders")) + for (var keys = Object.keys(message.targetRenders), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.Release.TargetRender.encode(message.targetRenders[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.abandoned != null && Object.hasOwnProperty.call(message, "abandoned")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.abandoned); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.cloud.deploy.v1.Release.ReleaseCondition.encode(message.condition, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.deployParameters != null && Object.hasOwnProperty.call(message, "deployParameters")) + for (var keys = Object.keys(message.deployParameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 25, wireType 2 =*/202).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.deployParameters[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Release message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.IRelease} message Release message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Release.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Release message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release} Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Release.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = 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 2: { - message.skaffoldSupportState = reader.int32(); - break; + message.annotations[key] = value; + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - case 3: { - message.maintenanceModeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + message.labels[key] = value; + break; + } + case 23: { + message.abandoned = reader.bool(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.renderStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.renderEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.skaffoldConfigUri = reader.string(); + break; + } + case 9: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 10: { + if (!(message.buildArtifacts && message.buildArtifacts.length)) + message.buildArtifacts = []; + message.buildArtifacts.push($root.google.cloud.deploy.v1.BuildArtifact.decode(reader, reader.uint32())); + break; + } + case 11: { + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.targetSnapshots && message.targetSnapshots.length)) + message.targetSnapshots = []; + message.targetSnapshots.push($root.google.cloud.deploy.v1.Target.decode(reader, reader.uint32())); + break; + } + case 13: { + message.renderState = reader.int32(); + break; + } + case 16: { + message.etag = reader.string(); + break; + } + case 19: { + message.skaffoldVersion = reader.string(); + break; + } + case 20: { + if (message.targetArtifacts === $util.emptyObject) + message.targetArtifacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.TargetArtifact.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - case 4: { - message.supportExpirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + message.targetArtifacts[key] = value; + break; + } + case 22: { + if (message.targetRenders === $util.emptyObject) + message.targetRenders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.Release.TargetRender.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } - default: - reader.skipType(tag & 7); + message.targetRenders[key] = value; + break; + } + case 24: { + message.condition = $root.google.cloud.deploy.v1.Release.ReleaseCondition.decode(reader, reader.uint32()); + break; + } + case 25: { + if (message.deployParameters === $util.emptyObject) + message.deployParameters = {}; + 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.deployParameters[key] = value; break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a SkaffoldSupportedCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SkaffoldSupportedCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Release message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release} Release + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Release.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SkaffoldSupportedCondition message. - * @function verify - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SkaffoldSupportedCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (typeof message.status !== "boolean") - return "status: boolean expected"; - if (message.skaffoldSupportState != null && message.hasOwnProperty("skaffoldSupportState")) - switch (message.skaffoldSupportState) { - default: - return "skaffoldSupportState: enum value expected"; - case 0: - case 1: - case 2: - case 3: + /** + * Verifies a Release message. + * @function verify + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Release.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.abandoned != null && message.hasOwnProperty("abandoned")) + if (typeof message.abandoned !== "boolean") + return "abandoned: boolean expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.renderStartTime); + if (error) + return "renderStartTime." + error; + } + if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.renderEndTime); + if (error) + return "renderEndTime." + error; + } + if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) + if (!$util.isString(message.skaffoldConfigUri)) + return "skaffoldConfigUri: string expected"; + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.buildArtifacts != null && message.hasOwnProperty("buildArtifacts")) { + if (!Array.isArray(message.buildArtifacts)) + return "buildArtifacts: array expected"; + for (var i = 0; i < message.buildArtifacts.length; ++i) { + var error = $root.google.cloud.deploy.v1.BuildArtifact.verify(message.buildArtifacts[i]); + if (error) + return "buildArtifacts." + error; + } + } + if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) { + var error = $root.google.cloud.deploy.v1.DeliveryPipeline.verify(message.deliveryPipelineSnapshot); + if (error) + return "deliveryPipelineSnapshot." + error; + } + if (message.targetSnapshots != null && message.hasOwnProperty("targetSnapshots")) { + if (!Array.isArray(message.targetSnapshots)) + return "targetSnapshots: array expected"; + for (var i = 0; i < message.targetSnapshots.length; ++i) { + var error = $root.google.cloud.deploy.v1.Target.verify(message.targetSnapshots[i]); + if (error) + return "targetSnapshots." + error; + } + } + if (message.renderState != null && message.hasOwnProperty("renderState")) + switch (message.renderState) { + default: + return "renderState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) + if (!$util.isString(message.skaffoldVersion)) + return "skaffoldVersion: string expected"; + if (message.targetArtifacts != null && message.hasOwnProperty("targetArtifacts")) { + if (!$util.isObject(message.targetArtifacts)) + return "targetArtifacts: object expected"; + var key = Object.keys(message.targetArtifacts); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.TargetArtifact.verify(message.targetArtifacts[key[i]]); + if (error) + return "targetArtifacts." + error; + } + } + if (message.targetRenders != null && message.hasOwnProperty("targetRenders")) { + if (!$util.isObject(message.targetRenders)) + return "targetRenders: object expected"; + var key = Object.keys(message.targetRenders); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.Release.TargetRender.verify(message.targetRenders[key[i]]); + if (error) + return "targetRenders." + error; + } + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.cloud.deploy.v1.Release.ReleaseCondition.verify(message.condition); + if (error) + return "condition." + error; + } + if (message.deployParameters != null && message.hasOwnProperty("deployParameters")) { + if (!$util.isObject(message.deployParameters)) + return "deployParameters: object expected"; + var key = Object.keys(message.deployParameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.deployParameters[key[i]])) + return "deployParameters: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Release message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release} Release + */ + Release.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release) + return object; + var message = new $root.google.cloud.deploy.v1.Release(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.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.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.abandoned != null) + message.abandoned = Boolean(object.abandoned); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.renderStartTime != null) { + if (typeof object.renderStartTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.renderStartTime: object expected"); + message.renderStartTime = $root.google.protobuf.Timestamp.fromObject(object.renderStartTime); + } + if (object.renderEndTime != null) { + if (typeof object.renderEndTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.renderEndTime: object expected"); + message.renderEndTime = $root.google.protobuf.Timestamp.fromObject(object.renderEndTime); + } + if (object.skaffoldConfigUri != null) + message.skaffoldConfigUri = String(object.skaffoldConfigUri); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.buildArtifacts) { + if (!Array.isArray(object.buildArtifacts)) + throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: array expected"); + message.buildArtifacts = []; + for (var i = 0; i < object.buildArtifacts.length; ++i) { + if (typeof object.buildArtifacts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.buildArtifacts: object expected"); + message.buildArtifacts[i] = $root.google.cloud.deploy.v1.BuildArtifact.fromObject(object.buildArtifacts[i]); + } + } + if (object.deliveryPipelineSnapshot != null) { + if (typeof object.deliveryPipelineSnapshot !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.deliveryPipelineSnapshot: object expected"); + message.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.fromObject(object.deliveryPipelineSnapshot); + } + if (object.targetSnapshots) { + if (!Array.isArray(object.targetSnapshots)) + throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: array expected"); + message.targetSnapshots = []; + for (var i = 0; i < object.targetSnapshots.length; ++i) { + if (typeof object.targetSnapshots[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetSnapshots: object expected"); + message.targetSnapshots[i] = $root.google.cloud.deploy.v1.Target.fromObject(object.targetSnapshots[i]); + } + } + switch (object.renderState) { + default: + if (typeof object.renderState === "number") { + message.renderState = object.renderState; + break; + } + break; + case "RENDER_STATE_UNSPECIFIED": + case 0: + message.renderState = 0; + break; + case "SUCCEEDED": + case 1: + message.renderState = 1; + break; + case "FAILED": + case 2: + message.renderState = 2; + break; + case "IN_PROGRESS": + case 3: + message.renderState = 3; + break; + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.skaffoldVersion != null) + message.skaffoldVersion = String(object.skaffoldVersion); + if (object.targetArtifacts) { + if (typeof object.targetArtifacts !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); + message.targetArtifacts = {}; + for (var keys = Object.keys(object.targetArtifacts), i = 0; i < keys.length; ++i) { + if (typeof object.targetArtifacts[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetArtifacts: object expected"); + message.targetArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.fromObject(object.targetArtifacts[keys[i]]); + } + } + if (object.targetRenders) { + if (typeof object.targetRenders !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); + message.targetRenders = {}; + for (var keys = Object.keys(object.targetRenders), i = 0; i < keys.length; ++i) { + if (typeof object.targetRenders[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.targetRenders: object expected"); + message.targetRenders[keys[i]] = $root.google.cloud.deploy.v1.Release.TargetRender.fromObject(object.targetRenders[keys[i]]); + } + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.condition: object expected"); + message.condition = $root.google.cloud.deploy.v1.Release.ReleaseCondition.fromObject(object.condition); + } + if (object.deployParameters) { + if (typeof object.deployParameters !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.deployParameters: object expected"); + message.deployParameters = {}; + for (var keys = Object.keys(object.deployParameters), i = 0; i < keys.length; ++i) + message.deployParameters[keys[i]] = String(object.deployParameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Release message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {google.cloud.deploy.v1.Release} message Release + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Release.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.buildArtifacts = []; + object.targetSnapshots = []; + } + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + object.targetArtifacts = {}; + object.targetRenders = {}; + object.deployParameters = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.renderStartTime = null; + object.renderEndTime = null; + object.skaffoldConfigPath = ""; + object.deliveryPipelineSnapshot = null; + object.renderState = options.enums === String ? "RENDER_STATE_UNSPECIFIED" : 0; + object.etag = ""; + object.skaffoldConfigUri = ""; + object.skaffoldVersion = ""; + object.abandoned = false; + object.condition = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.renderStartTime != null && message.hasOwnProperty("renderStartTime")) + object.renderStartTime = $root.google.protobuf.Timestamp.toObject(message.renderStartTime, options); + if (message.renderEndTime != null && message.hasOwnProperty("renderEndTime")) + object.renderEndTime = $root.google.protobuf.Timestamp.toObject(message.renderEndTime, options); + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.buildArtifacts && message.buildArtifacts.length) { + object.buildArtifacts = []; + for (var j = 0; j < message.buildArtifacts.length; ++j) + object.buildArtifacts[j] = $root.google.cloud.deploy.v1.BuildArtifact.toObject(message.buildArtifacts[j], options); + } + if (message.deliveryPipelineSnapshot != null && message.hasOwnProperty("deliveryPipelineSnapshot")) + object.deliveryPipelineSnapshot = $root.google.cloud.deploy.v1.DeliveryPipeline.toObject(message.deliveryPipelineSnapshot, options); + if (message.targetSnapshots && message.targetSnapshots.length) { + object.targetSnapshots = []; + for (var j = 0; j < message.targetSnapshots.length; ++j) + object.targetSnapshots[j] = $root.google.cloud.deploy.v1.Target.toObject(message.targetSnapshots[j], options); + } + if (message.renderState != null && message.hasOwnProperty("renderState")) + object.renderState = options.enums === String ? $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] === undefined ? message.renderState : $root.google.cloud.deploy.v1.Release.RenderState[message.renderState] : message.renderState; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.skaffoldConfigUri != null && message.hasOwnProperty("skaffoldConfigUri")) + object.skaffoldConfigUri = message.skaffoldConfigUri; + if (message.skaffoldVersion != null && message.hasOwnProperty("skaffoldVersion")) + object.skaffoldVersion = message.skaffoldVersion; + if (message.targetArtifacts && (keys2 = Object.keys(message.targetArtifacts)).length) { + object.targetArtifacts = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.toObject(message.targetArtifacts[keys2[j]], options); + } + if (message.targetRenders && (keys2 = Object.keys(message.targetRenders)).length) { + object.targetRenders = {}; + for (var j = 0; j < keys2.length; ++j) + object.targetRenders[keys2[j]] = $root.google.cloud.deploy.v1.Release.TargetRender.toObject(message.targetRenders[keys2[j]], options); + } + if (message.abandoned != null && message.hasOwnProperty("abandoned")) + object.abandoned = message.abandoned; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.cloud.deploy.v1.Release.ReleaseCondition.toObject(message.condition, options); + if (message.deployParameters && (keys2 = Object.keys(message.deployParameters)).length) { + object.deployParameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.deployParameters[keys2[j]] = message.deployParameters[keys2[j]]; + } + return object; + }; + + /** + * Converts this Release to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release + * @instance + * @returns {Object.} JSON object + */ + Release.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Release + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Release.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release"; + }; + + /** + * RenderState enum. + * @name google.cloud.deploy.v1.Release.RenderState + * @enum {number} + * @property {number} RENDER_STATE_UNSPECIFIED=0 RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + Release.RenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + + Release.TargetRender = (function() { + + /** + * Properties of a TargetRender. + * @memberof google.cloud.deploy.v1.Release + * @interface ITargetRender + * @property {string|null} [renderingBuild] TargetRender renderingBuild + * @property {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState|null} [renderingState] TargetRender renderingState + * @property {google.cloud.deploy.v1.IRenderMetadata|null} [metadata] TargetRender metadata + * @property {google.cloud.deploy.v1.Release.TargetRender.FailureCause|null} [failureCause] TargetRender failureCause + * @property {string|null} [failureMessage] TargetRender failureMessage + */ + + /** + * Constructs a new TargetRender. + * @memberof google.cloud.deploy.v1.Release + * @classdesc Represents a TargetRender. + * @implements ITargetRender + * @constructor + * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set + */ + function TargetRender(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetRender renderingBuild. + * @member {string} renderingBuild + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.renderingBuild = ""; + + /** + * TargetRender renderingState. + * @member {google.cloud.deploy.v1.Release.TargetRender.TargetRenderState} renderingState + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.renderingState = 0; + + /** + * TargetRender metadata. + * @member {google.cloud.deploy.v1.IRenderMetadata|null|undefined} metadata + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.metadata = null; + + /** + * TargetRender failureCause. + * @member {google.cloud.deploy.v1.Release.TargetRender.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.failureCause = 0; + + /** + * TargetRender failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + */ + TargetRender.prototype.failureMessage = ""; + + /** + * Creates a new TargetRender instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender instance + */ + TargetRender.create = function create(properties) { + return new TargetRender(properties); + }; + + /** + * Encodes the specified TargetRender message. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetRender.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.renderingBuild != null && Object.hasOwnProperty.call(message, "renderingBuild")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.renderingBuild); + if (message.renderingState != null && Object.hasOwnProperty.call(message, "renderingState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.renderingState); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.failureMessage); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.deploy.v1.RenderMetadata.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetRender message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.TargetRender.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.ITargetRender} message TargetRender message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetRender.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetRender message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetRender.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.TargetRender(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.renderingBuild = reader.string(); + break; + } + case 2: { + message.renderingState = reader.int32(); + break; + } + case 6: { + message.metadata = $root.google.cloud.deploy.v1.RenderMetadata.decode(reader, reader.uint32()); + break; + } + case 4: { + message.failureCause = reader.int32(); + break; + } + case 5: { + message.failureMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetRender message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetRender.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetRender message. + * @function verify + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetRender.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) + if (!$util.isString(message.renderingBuild)) + return "renderingBuild: string expected"; + if (message.renderingState != null && message.hasOwnProperty("renderingState")) + switch (message.renderingState) { + default: + return "renderingState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.cloud.deploy.v1.RenderMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; + return null; + }; + + /** + * Creates a TargetRender message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release.TargetRender} TargetRender + */ + TargetRender.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release.TargetRender) + return object; + var message = new $root.google.cloud.deploy.v1.Release.TargetRender(); + if (object.renderingBuild != null) + message.renderingBuild = String(object.renderingBuild); + switch (object.renderingState) { + default: + if (typeof object.renderingState === "number") { + message.renderingState = object.renderingState; + break; + } + break; + case "TARGET_RENDER_STATE_UNSPECIFIED": + case 0: + message.renderingState = 0; + break; + case "SUCCEEDED": + case 1: + message.renderingState = 1; + break; + case "FAILED": + case 2: + message.renderingState = 2; + break; + case "IN_PROGRESS": + case 3: + message.renderingState = 3; + break; + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.TargetRender.metadata: object expected"); + message.metadata = $root.google.cloud.deploy.v1.RenderMetadata.fromObject(object.metadata); + } + switch (object.failureCause) { + default: + if (typeof object.failureCause === "number") { + message.failureCause = object.failureCause; + break; + } + break; + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + case "CLOUD_BUILD_REQUEST_FAILED": + case 3: + message.failureCause = 3; + break; + case "VERIFICATION_CONFIG_NOT_FOUND": + case 4: + message.failureCause = 4; + break; + case "CUSTOM_ACTION_NOT_FOUND": + case 5: + message.failureCause = 5; + break; + } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); + return message; + }; + + /** + * Creates a plain object from a TargetRender message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {google.cloud.deploy.v1.Release.TargetRender} message TargetRender + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetRender.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.renderingBuild = ""; + object.renderingState = options.enums === String ? "TARGET_RENDER_STATE_UNSPECIFIED" : 0; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; + object.metadata = null; + } + if (message.renderingBuild != null && message.hasOwnProperty("renderingBuild")) + object.renderingBuild = message.renderingBuild; + if (message.renderingState != null && message.hasOwnProperty("renderingState")) + object.renderingState = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] === undefined ? message.renderingState : $root.google.cloud.deploy.v1.Release.TargetRender.TargetRenderState[message.renderingState] : message.renderingState; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.Release.TargetRender.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.deploy.v1.RenderMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this TargetRender to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @instance + * @returns {Object.} JSON object + */ + TargetRender.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetRender + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release.TargetRender + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetRender.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release.TargetRender"; + }; + + /** + * TargetRenderState enum. + * @name google.cloud.deploy.v1.Release.TargetRender.TargetRenderState + * @enum {number} + * @property {number} TARGET_RENDER_STATE_UNSPECIFIED=0 TARGET_RENDER_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + */ + TargetRender.TargetRenderState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_RENDER_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + return values; + })(); + + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.Release.TargetRender.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} CLOUD_BUILD_REQUEST_FAILED=3 CLOUD_BUILD_REQUEST_FAILED value + * @property {number} VERIFICATION_CONFIG_NOT_FOUND=4 VERIFICATION_CONFIG_NOT_FOUND value + * @property {number} CUSTOM_ACTION_NOT_FOUND=5 CUSTOM_ACTION_NOT_FOUND value + */ + TargetRender.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "CLOUD_BUILD_REQUEST_FAILED"] = 3; + values[valuesById[4] = "VERIFICATION_CONFIG_NOT_FOUND"] = 4; + values[valuesById[5] = "CUSTOM_ACTION_NOT_FOUND"] = 5; + return values; + })(); + + return TargetRender; + })(); + + Release.ReleaseReadyCondition = (function() { + + /** + * Properties of a ReleaseReadyCondition. + * @memberof google.cloud.deploy.v1.Release + * @interface IReleaseReadyCondition + * @property {boolean|null} [status] ReleaseReadyCondition status + */ + + /** + * Constructs a new ReleaseReadyCondition. + * @memberof google.cloud.deploy.v1.Release + * @classdesc Represents a ReleaseReadyCondition. + * @implements IReleaseReadyCondition + * @constructor + * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition=} [properties] Properties to set + */ + function ReleaseReadyCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseReadyCondition status. + * @member {boolean} status + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @instance + */ + ReleaseReadyCondition.prototype.status = false; + + /** + * Creates a new ReleaseReadyCondition instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition instance + */ + ReleaseReadyCondition.create = function create(properties) { + return new ReleaseReadyCondition(properties); + }; + + /** + * Encodes the specified ReleaseReadyCondition message. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseReadyCondition.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition} message ReleaseReadyCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseReadyCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); + return writer; + }; + + /** + * Encodes the specified ReleaseReadyCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseReadyCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {google.cloud.deploy.v1.Release.IReleaseReadyCondition} message ReleaseReadyCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseReadyCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseReadyCondition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseReadyCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.status = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseReadyCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseReadyCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseReadyCondition message. + * @function verify + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseReadyCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status !== "boolean") + return "status: boolean expected"; + return null; + }; + + /** + * Creates a ReleaseReadyCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release.ReleaseReadyCondition} ReleaseReadyCondition + */ + ReleaseReadyCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition) + return object; + var message = new $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition(); + if (object.status != null) + message.status = Boolean(object.status); + return message; + }; + + /** + * Creates a plain object from a ReleaseReadyCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {google.cloud.deploy.v1.Release.ReleaseReadyCondition} message ReleaseReadyCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseReadyCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.status = false; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + return object; + }; + + /** + * Converts this ReleaseReadyCondition to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @instance + * @returns {Object.} JSON object + */ + ReleaseReadyCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReleaseReadyCondition + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release.ReleaseReadyCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseReadyCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release.ReleaseReadyCondition"; + }; + + return ReleaseReadyCondition; + })(); + + Release.SkaffoldSupportedCondition = (function() { + + /** + * Properties of a SkaffoldSupportedCondition. + * @memberof google.cloud.deploy.v1.Release + * @interface ISkaffoldSupportedCondition + * @property {boolean|null} [status] SkaffoldSupportedCondition status + * @property {google.cloud.deploy.v1.SkaffoldSupportState|null} [skaffoldSupportState] SkaffoldSupportedCondition skaffoldSupportState + * @property {google.protobuf.ITimestamp|null} [maintenanceModeTime] SkaffoldSupportedCondition maintenanceModeTime + * @property {google.protobuf.ITimestamp|null} [supportExpirationTime] SkaffoldSupportedCondition supportExpirationTime + */ + + /** + * Constructs a new SkaffoldSupportedCondition. + * @memberof google.cloud.deploy.v1.Release + * @classdesc Represents a SkaffoldSupportedCondition. + * @implements ISkaffoldSupportedCondition + * @constructor + * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition=} [properties] Properties to set + */ + function SkaffoldSupportedCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SkaffoldSupportedCondition status. + * @member {boolean} status + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @instance + */ + SkaffoldSupportedCondition.prototype.status = false; + + /** + * SkaffoldSupportedCondition skaffoldSupportState. + * @member {google.cloud.deploy.v1.SkaffoldSupportState} skaffoldSupportState + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @instance + */ + SkaffoldSupportedCondition.prototype.skaffoldSupportState = 0; + + /** + * SkaffoldSupportedCondition maintenanceModeTime. + * @member {google.protobuf.ITimestamp|null|undefined} maintenanceModeTime + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @instance + */ + SkaffoldSupportedCondition.prototype.maintenanceModeTime = null; + + /** + * SkaffoldSupportedCondition supportExpirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} supportExpirationTime + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @instance + */ + SkaffoldSupportedCondition.prototype.supportExpirationTime = null; + + /** + * Creates a new SkaffoldSupportedCondition instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition instance + */ + SkaffoldSupportedCondition.create = function create(properties) { + return new SkaffoldSupportedCondition(properties); + }; + + /** + * Encodes the specified SkaffoldSupportedCondition message. Does not implicitly {@link google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition} message SkaffoldSupportedCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SkaffoldSupportedCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.status); + if (message.skaffoldSupportState != null && Object.hasOwnProperty.call(message, "skaffoldSupportState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.skaffoldSupportState); + if (message.maintenanceModeTime != null && Object.hasOwnProperty.call(message, "maintenanceModeTime")) + $root.google.protobuf.Timestamp.encode(message.maintenanceModeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.supportExpirationTime != null && Object.hasOwnProperty.call(message, "supportExpirationTime")) + $root.google.protobuf.Timestamp.encode(message.supportExpirationTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SkaffoldSupportedCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition} message SkaffoldSupportedCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SkaffoldSupportedCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SkaffoldSupportedCondition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SkaffoldSupportedCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.status = reader.bool(); + break; + } + case 2: { + message.skaffoldSupportState = reader.int32(); + break; + } + case 3: { + message.maintenanceModeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.supportExpirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SkaffoldSupportedCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SkaffoldSupportedCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SkaffoldSupportedCondition message. + * @function verify + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SkaffoldSupportedCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (typeof message.status !== "boolean") + return "status: boolean expected"; + if (message.skaffoldSupportState != null && message.hasOwnProperty("skaffoldSupportState")) + switch (message.skaffoldSupportState) { + default: + return "skaffoldSupportState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.maintenanceModeTime); + if (error) + return "maintenanceModeTime." + error; + } + if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.supportExpirationTime); + if (error) + return "supportExpirationTime." + error; + } + return null; + }; + + /** + * Creates a SkaffoldSupportedCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition + */ + SkaffoldSupportedCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition) + return object; + var message = new $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition(); + if (object.status != null) + message.status = Boolean(object.status); + switch (object.skaffoldSupportState) { + default: + if (typeof object.skaffoldSupportState === "number") { + message.skaffoldSupportState = object.skaffoldSupportState; + break; + } + break; + case "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED": + case 0: + message.skaffoldSupportState = 0; + break; + case "SKAFFOLD_SUPPORT_STATE_SUPPORTED": + case 1: + message.skaffoldSupportState = 1; + break; + case "SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE": + case 2: + message.skaffoldSupportState = 2; + break; + case "SKAFFOLD_SUPPORT_STATE_UNSUPPORTED": + case 3: + message.skaffoldSupportState = 3; + break; + } + if (object.maintenanceModeTime != null) { + if (typeof object.maintenanceModeTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.maintenanceModeTime: object expected"); + message.maintenanceModeTime = $root.google.protobuf.Timestamp.fromObject(object.maintenanceModeTime); + } + if (object.supportExpirationTime != null) { + if (typeof object.supportExpirationTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.supportExpirationTime: object expected"); + message.supportExpirationTime = $root.google.protobuf.Timestamp.fromObject(object.supportExpirationTime); + } + return message; + }; + + /** + * Creates a plain object from a SkaffoldSupportedCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} message SkaffoldSupportedCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SkaffoldSupportedCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = false; + object.skaffoldSupportState = options.enums === String ? "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED" : 0; + object.maintenanceModeTime = null; + object.supportExpirationTime = null; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.skaffoldSupportState != null && message.hasOwnProperty("skaffoldSupportState")) + object.skaffoldSupportState = options.enums === String ? $root.google.cloud.deploy.v1.SkaffoldSupportState[message.skaffoldSupportState] === undefined ? message.skaffoldSupportState : $root.google.cloud.deploy.v1.SkaffoldSupportState[message.skaffoldSupportState] : message.skaffoldSupportState; + if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) + object.maintenanceModeTime = $root.google.protobuf.Timestamp.toObject(message.maintenanceModeTime, options); + if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) + object.supportExpirationTime = $root.google.protobuf.Timestamp.toObject(message.supportExpirationTime, options); + return object; + }; + + /** + * Converts this SkaffoldSupportedCondition to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @instance + * @returns {Object.} JSON object + */ + SkaffoldSupportedCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SkaffoldSupportedCondition + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SkaffoldSupportedCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release.SkaffoldSupportedCondition"; + }; + + return SkaffoldSupportedCondition; + })(); + + Release.ReleaseCondition = (function() { + + /** + * Properties of a ReleaseCondition. + * @memberof google.cloud.deploy.v1.Release + * @interface IReleaseCondition + * @property {google.cloud.deploy.v1.Release.IReleaseReadyCondition|null} [releaseReadyCondition] ReleaseCondition releaseReadyCondition + * @property {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition|null} [skaffoldSupportedCondition] ReleaseCondition skaffoldSupportedCondition + */ + + /** + * Constructs a new ReleaseCondition. + * @memberof google.cloud.deploy.v1.Release + * @classdesc Represents a ReleaseCondition. + * @implements IReleaseCondition + * @constructor + * @param {google.cloud.deploy.v1.Release.IReleaseCondition=} [properties] Properties to set + */ + function ReleaseCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReleaseCondition releaseReadyCondition. + * @member {google.cloud.deploy.v1.Release.IReleaseReadyCondition|null|undefined} releaseReadyCondition + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @instance + */ + ReleaseCondition.prototype.releaseReadyCondition = null; + + /** + * ReleaseCondition skaffoldSupportedCondition. + * @member {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition|null|undefined} skaffoldSupportedCondition + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @instance + */ + ReleaseCondition.prototype.skaffoldSupportedCondition = null; + + /** + * Creates a new ReleaseCondition instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {google.cloud.deploy.v1.Release.IReleaseCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition instance + */ + ReleaseCondition.create = function create(properties) { + return new ReleaseCondition(properties); + }; + + /** + * Encodes the specified ReleaseCondition message. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseCondition.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {google.cloud.deploy.v1.Release.IReleaseCondition} message ReleaseCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.releaseReadyCondition != null && Object.hasOwnProperty.call(message, "releaseReadyCondition")) + $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.encode(message.releaseReadyCondition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.skaffoldSupportedCondition != null && Object.hasOwnProperty.call(message, "skaffoldSupportedCondition")) + $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.encode(message.skaffoldSupportedCondition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReleaseCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {google.cloud.deploy.v1.Release.IReleaseCondition} message ReleaseCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReleaseCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReleaseCondition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.ReleaseCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.releaseReadyCondition = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.decode(reader, reader.uint32()); + break; + } + case 2: { + message.skaffoldSupportedCondition = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReleaseCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReleaseCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReleaseCondition message. + * @function verify + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReleaseCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.releaseReadyCondition != null && message.hasOwnProperty("releaseReadyCondition")) { + var error = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.verify(message.releaseReadyCondition); + if (error) + return "releaseReadyCondition." + error; + } + if (message.skaffoldSupportedCondition != null && message.hasOwnProperty("skaffoldSupportedCondition")) { + var error = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.verify(message.skaffoldSupportedCondition); + if (error) + return "skaffoldSupportedCondition." + error; + } + return null; + }; + + /** + * Creates a ReleaseCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition + */ + ReleaseCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Release.ReleaseCondition) + return object; + var message = new $root.google.cloud.deploy.v1.Release.ReleaseCondition(); + if (object.releaseReadyCondition != null) { + if (typeof object.releaseReadyCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.ReleaseCondition.releaseReadyCondition: object expected"); + message.releaseReadyCondition = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.fromObject(object.releaseReadyCondition); + } + if (object.skaffoldSupportedCondition != null) { + if (typeof object.skaffoldSupportedCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.Release.ReleaseCondition.skaffoldSupportedCondition: object expected"); + message.skaffoldSupportedCondition = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.fromObject(object.skaffoldSupportedCondition); + } + return message; + }; + + /** + * Creates a plain object from a ReleaseCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {google.cloud.deploy.v1.Release.ReleaseCondition} message ReleaseCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReleaseCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.releaseReadyCondition = null; + object.skaffoldSupportedCondition = null; + } + if (message.releaseReadyCondition != null && message.hasOwnProperty("releaseReadyCondition")) + object.releaseReadyCondition = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.toObject(message.releaseReadyCondition, options); + if (message.skaffoldSupportedCondition != null && message.hasOwnProperty("skaffoldSupportedCondition")) + object.skaffoldSupportedCondition = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.toObject(message.skaffoldSupportedCondition, options); + return object; + }; + + /** + * Converts this ReleaseCondition to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @instance + * @returns {Object.} JSON object + */ + ReleaseCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReleaseCondition + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Release.ReleaseCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReleaseCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Release.ReleaseCondition"; + }; + + return ReleaseCondition; + })(); + + return Release; + })(); + + v1.BuildArtifact = (function() { + + /** + * Properties of a BuildArtifact. + * @memberof google.cloud.deploy.v1 + * @interface IBuildArtifact + * @property {string|null} [image] BuildArtifact image + * @property {string|null} [tag] BuildArtifact tag + */ + + /** + * Constructs a new BuildArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a BuildArtifact. + * @implements IBuildArtifact + * @constructor + * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + */ + function BuildArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildArtifact image. + * @member {string} image + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + */ + BuildArtifact.prototype.image = ""; + + /** + * BuildArtifact tag. + * @member {string} tag + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + */ + BuildArtifact.prototype.tag = ""; + + /** + * Creates a new BuildArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact instance + */ + BuildArtifact.create = function create(properties) { + return new BuildArtifact(properties); + }; + + /** + * Encodes the specified BuildArtifact message. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.image); + return writer; + }; + + /** + * Encodes the specified BuildArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.BuildArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.image = reader.string(); + break; + } + case 2: { + message.tag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a BuildArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + */ + BuildArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.BuildArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.BuildArtifact(); + if (object.image != null) + message.image = String(object.image); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a BuildArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {google.cloud.deploy.v1.BuildArtifact} message BuildArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = ""; + object.image = ""; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; + return object; + }; + + /** + * Converts this BuildArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.BuildArtifact + * @instance + * @returns {Object.} JSON object + */ + BuildArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BuildArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.BuildArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.BuildArtifact"; + }; + + return BuildArtifact; + })(); + + v1.TargetArtifact = (function() { + + /** + * Properties of a TargetArtifact. + * @memberof google.cloud.deploy.v1 + * @interface ITargetArtifact + * @property {string|null} [artifactUri] TargetArtifact artifactUri + * @property {string|null} [skaffoldConfigPath] TargetArtifact skaffoldConfigPath + * @property {string|null} [manifestPath] TargetArtifact manifestPath + * @property {Object.|null} [phaseArtifacts] TargetArtifact phaseArtifacts + */ + + /** + * Constructs a new TargetArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a TargetArtifact. + * @implements ITargetArtifact + * @constructor + * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + */ + function TargetArtifact(properties) { + this.phaseArtifacts = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetArtifact artifactUri. + * @member {string|null|undefined} artifactUri + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.artifactUri = null; + + /** + * TargetArtifact skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.skaffoldConfigPath = ""; + + /** + * TargetArtifact manifestPath. + * @member {string} manifestPath + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.manifestPath = ""; + + /** + * TargetArtifact phaseArtifacts. + * @member {Object.} phaseArtifacts + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + TargetArtifact.prototype.phaseArtifacts = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetArtifact uri. + * @member {"artifactUri"|undefined} uri + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + */ + Object.defineProperty(TargetArtifact.prototype, "uri", { + get: $util.oneOfGetter($oneOfFields = ["artifactUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact instance + */ + TargetArtifact.create = function create(properties) { + return new TargetArtifact(properties); + }; + + /** + * Encodes the specified TargetArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.skaffoldConfigPath); + if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); + if (message.phaseArtifacts != null && Object.hasOwnProperty.call(message, "phaseArtifacts")) + for (var keys = Object.keys(message.phaseArtifacts), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.encode(message.phaseArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified TargetArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.artifactUri = reader.string(); + break; + } + case 2: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 3: { + message.manifestPath = reader.string(); + break; + } + case 5: { + if (message.phaseArtifacts === $util.emptyObject) + message.phaseArtifacts = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.phaseArtifacts[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { + properties.uri = 1; + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + if (!$util.isString(message.manifestPath)) + return "manifestPath: string expected"; + if (message.phaseArtifacts != null && message.hasOwnProperty("phaseArtifacts")) { + if (!$util.isObject(message.phaseArtifacts)) + return "phaseArtifacts: object expected"; + var key = Object.keys(message.phaseArtifacts); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.verify(message.phaseArtifacts[key[i]]); + if (error) + return "phaseArtifacts." + error; + } + } + return null; + }; + + /** + * Creates a TargetArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + */ + TargetArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.TargetArtifact(); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.manifestPath != null) + message.manifestPath = String(object.manifestPath); + if (object.phaseArtifacts) { + if (typeof object.phaseArtifacts !== "object") + throw TypeError(".google.cloud.deploy.v1.TargetArtifact.phaseArtifacts: object expected"); + message.phaseArtifacts = {}; + for (var keys = Object.keys(object.phaseArtifacts), i = 0; i < keys.length; ++i) { + if (typeof object.phaseArtifacts[keys[i]] !== "object") + throw TypeError(".google.cloud.deploy.v1.TargetArtifact.phaseArtifacts: object expected"); + message.phaseArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.fromObject(object.phaseArtifacts[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a TargetArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact} message TargetArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.phaseArtifacts = {}; + if (options.defaults) { + object.skaffoldConfigPath = ""; + object.manifestPath = ""; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + object.manifestPath = message.manifestPath; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { + object.artifactUri = message.artifactUri; + if (options.oneofs) + object.uri = "artifactUri"; + } + var keys2; + if (message.phaseArtifacts && (keys2 = Object.keys(message.phaseArtifacts)).length) { + object.phaseArtifacts = {}; + for (var j = 0; j < keys2.length; ++j) + object.phaseArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.toObject(message.phaseArtifacts[keys2[j]], options); + } + return object; + }; + + /** + * Converts this TargetArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetArtifact + * @instance + * @returns {Object.} JSON object + */ + TargetArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact"; + }; + + TargetArtifact.PhaseArtifact = (function() { + + /** + * Properties of a PhaseArtifact. + * @memberof google.cloud.deploy.v1.TargetArtifact + * @interface IPhaseArtifact + * @property {string|null} [skaffoldConfigPath] PhaseArtifact skaffoldConfigPath + * @property {string|null} [manifestPath] PhaseArtifact manifestPath + * @property {string|null} [jobManifestsPath] PhaseArtifact jobManifestsPath + */ + + /** + * Constructs a new PhaseArtifact. + * @memberof google.cloud.deploy.v1.TargetArtifact + * @classdesc Represents a PhaseArtifact. + * @implements IPhaseArtifact + * @constructor + * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact=} [properties] Properties to set + */ + function PhaseArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhaseArtifact skaffoldConfigPath. + * @member {string} skaffoldConfigPath + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @instance + */ + PhaseArtifact.prototype.skaffoldConfigPath = ""; + + /** + * PhaseArtifact manifestPath. + * @member {string} manifestPath + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @instance + */ + PhaseArtifact.prototype.manifestPath = ""; + + /** + * PhaseArtifact jobManifestsPath. + * @member {string} jobManifestsPath + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @instance + */ + PhaseArtifact.prototype.jobManifestsPath = ""; + + /** + * Creates a new PhaseArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact instance + */ + PhaseArtifact.create = function create(properties) { + return new PhaseArtifact(properties); + }; + + /** + * Encodes the specified PhaseArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact} message PhaseArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhaseArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.skaffoldConfigPath); + if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); + if (message.jobManifestsPath != null && Object.hasOwnProperty.call(message, "jobManifestsPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobManifestsPath); + return writer; + }; + + /** + * Encodes the specified PhaseArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact} message PhaseArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhaseArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhaseArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhaseArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.skaffoldConfigPath = reader.string(); + break; + } + case 3: { + message.manifestPath = reader.string(); + break; + } + case 4: { + message.jobManifestsPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhaseArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhaseArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhaseArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhaseArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + if (!$util.isString(message.skaffoldConfigPath)) + return "skaffoldConfigPath: string expected"; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + if (!$util.isString(message.manifestPath)) + return "manifestPath: string expected"; + if (message.jobManifestsPath != null && message.hasOwnProperty("jobManifestsPath")) + if (!$util.isString(message.jobManifestsPath)) + return "jobManifestsPath: string expected"; + return null; + }; + + /** + * Creates a PhaseArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact + */ + PhaseArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact(); + if (object.skaffoldConfigPath != null) + message.skaffoldConfigPath = String(object.skaffoldConfigPath); + if (object.manifestPath != null) + message.manifestPath = String(object.manifestPath); + if (object.jobManifestsPath != null) + message.jobManifestsPath = String(object.jobManifestsPath); + return message; + }; + + /** + * Creates a plain object from a PhaseArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} message PhaseArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhaseArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.skaffoldConfigPath = ""; + object.manifestPath = ""; + object.jobManifestsPath = ""; + } + if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) + object.skaffoldConfigPath = message.skaffoldConfigPath; + if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) + object.manifestPath = message.manifestPath; + if (message.jobManifestsPath != null && message.hasOwnProperty("jobManifestsPath")) + object.jobManifestsPath = message.jobManifestsPath; + return object; + }; + + /** + * Converts this PhaseArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @instance + * @returns {Object.} JSON object + */ + PhaseArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhaseArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhaseArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact.PhaseArtifact"; + }; + + return PhaseArtifact; + })(); + + return TargetArtifact; + })(); + + v1.DeployArtifact = (function() { + + /** + * Properties of a DeployArtifact. + * @memberof google.cloud.deploy.v1 + * @interface IDeployArtifact + * @property {string|null} [artifactUri] DeployArtifact artifactUri + * @property {Array.|null} [manifestPaths] DeployArtifact manifestPaths + */ + + /** + * Constructs a new DeployArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployArtifact. + * @implements IDeployArtifact + * @constructor + * @param {google.cloud.deploy.v1.IDeployArtifact=} [properties] Properties to set + */ + function DeployArtifact(properties) { + this.manifestPaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployArtifact artifactUri. + * @member {string} artifactUri + * @memberof google.cloud.deploy.v1.DeployArtifact + * @instance + */ + DeployArtifact.prototype.artifactUri = ""; + + /** + * DeployArtifact manifestPaths. + * @member {Array.} manifestPaths + * @memberof google.cloud.deploy.v1.DeployArtifact + * @instance + */ + DeployArtifact.prototype.manifestPaths = $util.emptyArray; + + /** + * Creates a new DeployArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.IDeployArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact instance + */ + DeployArtifact.create = function create(properties) { + return new DeployArtifact(properties); + }; + + /** + * Encodes the specified DeployArtifact message. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.IDeployArtifact} message DeployArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifactUri); + if (message.manifestPaths != null && message.manifestPaths.length) + for (var i = 0; i < message.manifestPaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.manifestPaths[i]); + return writer; + }; + + /** + * Encodes the specified DeployArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.IDeployArtifact} message DeployArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.artifactUri = reader.string(); + break; + } + case 2: { + if (!(message.manifestPaths && message.manifestPaths.length)) + message.manifestPaths = []; + message.manifestPaths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + if (message.manifestPaths != null && message.hasOwnProperty("manifestPaths")) { + if (!Array.isArray(message.manifestPaths)) + return "manifestPaths: array expected"; + for (var i = 0; i < message.manifestPaths.length; ++i) + if (!$util.isString(message.manifestPaths[i])) + return "manifestPaths: string[] expected"; + } + return null; + }; + + /** + * Creates a DeployArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + */ + DeployArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.DeployArtifact(); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.manifestPaths) { + if (!Array.isArray(object.manifestPaths)) + throw TypeError(".google.cloud.deploy.v1.DeployArtifact.manifestPaths: array expected"); + message.manifestPaths = []; + for (var i = 0; i < object.manifestPaths.length; ++i) + message.manifestPaths[i] = String(object.manifestPaths[i]); + } + return message; + }; + + /** + * Creates a plain object from a DeployArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.DeployArtifact} message DeployArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.manifestPaths = []; + if (options.defaults) + object.artifactUri = ""; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + object.artifactUri = message.artifactUri; + if (message.manifestPaths && message.manifestPaths.length) { + object.manifestPaths = []; + for (var j = 0; j < message.manifestPaths.length; ++j) + object.manifestPaths[j] = message.manifestPaths[j]; + } + return object; + }; + + /** + * Converts this DeployArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployArtifact + * @instance + * @returns {Object.} JSON object + */ + DeployArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployArtifact"; + }; + + return DeployArtifact; + })(); + + v1.CloudRunRenderMetadata = (function() { + + /** + * Properties of a CloudRunRenderMetadata. + * @memberof google.cloud.deploy.v1 + * @interface ICloudRunRenderMetadata + * @property {string|null} [service] CloudRunRenderMetadata service + */ + + /** + * Constructs a new CloudRunRenderMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CloudRunRenderMetadata. + * @implements ICloudRunRenderMetadata + * @constructor + * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata=} [properties] Properties to set + */ + function CloudRunRenderMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRenderMetadata service. + * @member {string} service + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @instance + */ + CloudRunRenderMetadata.prototype.service = ""; + + /** + * Creates a new CloudRunRenderMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata instance + */ + CloudRunRenderMetadata.create = function create(properties) { + return new CloudRunRenderMetadata(properties); + }; + + /** + * Encodes the specified CloudRunRenderMetadata message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunRenderMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata} message CloudRunRenderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRenderMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + return writer; + }; + + /** + * Encodes the specified CloudRunRenderMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunRenderMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata} message CloudRunRenderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRenderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRenderMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRenderMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunRenderMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRenderMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRenderMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRenderMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRenderMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + return null; + }; + + /** + * Creates a CloudRunRenderMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata + */ + CloudRunRenderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CloudRunRenderMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.CloudRunRenderMetadata(); + if (object.service != null) + message.service = String(object.service); + return message; + }; + + /** + * Creates a plain object from a CloudRunRenderMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {google.cloud.deploy.v1.CloudRunRenderMetadata} message CloudRunRenderMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRenderMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + return object; + }; + + /** + * Converts this CloudRunRenderMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @instance + * @returns {Object.} JSON object + */ + CloudRunRenderMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRenderMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRenderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunRenderMetadata"; + }; + + return CloudRunRenderMetadata; + })(); + + v1.RenderMetadata = (function() { + + /** + * Properties of a RenderMetadata. + * @memberof google.cloud.deploy.v1 + * @interface IRenderMetadata + * @property {google.cloud.deploy.v1.ICloudRunRenderMetadata|null} [cloudRun] RenderMetadata cloudRun + */ + + /** + * Constructs a new RenderMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RenderMetadata. + * @implements IRenderMetadata + * @constructor + * @param {google.cloud.deploy.v1.IRenderMetadata=} [properties] Properties to set + */ + function RenderMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RenderMetadata cloudRun. + * @member {google.cloud.deploy.v1.ICloudRunRenderMetadata|null|undefined} cloudRun + * @memberof google.cloud.deploy.v1.RenderMetadata + * @instance + */ + RenderMetadata.prototype.cloudRun = null; + + /** + * Creates a new RenderMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {google.cloud.deploy.v1.IRenderMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata instance + */ + RenderMetadata.create = function create(properties) { + return new RenderMetadata(properties); + }; + + /** + * Encodes the specified RenderMetadata message. Does not implicitly {@link google.cloud.deploy.v1.RenderMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {google.cloud.deploy.v1.IRenderMetadata} message RenderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RenderMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) + $root.google.cloud.deploy.v1.CloudRunRenderMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RenderMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RenderMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {google.cloud.deploy.v1.IRenderMetadata} message RenderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RenderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RenderMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RenderMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RenderMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RenderMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RenderMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RenderMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RenderMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + var error = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.verify(message.cloudRun); + if (error) + return "cloudRun." + error; + } + return null; + }; + + /** + * Creates a RenderMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata + */ + RenderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RenderMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.RenderMetadata(); + if (object.cloudRun != null) { + if (typeof object.cloudRun !== "object") + throw TypeError(".google.cloud.deploy.v1.RenderMetadata.cloudRun: object expected"); + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.fromObject(object.cloudRun); + } + return message; + }; + + /** + * Creates a plain object from a RenderMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {google.cloud.deploy.v1.RenderMetadata} message RenderMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RenderMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cloudRun = null; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) + object.cloudRun = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.toObject(message.cloudRun, options); + return object; + }; + + /** + * Converts this RenderMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RenderMetadata + * @instance + * @returns {Object.} JSON object + */ + RenderMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RenderMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RenderMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RenderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RenderMetadata"; + }; + + return RenderMetadata; + })(); + + v1.ListReleasesRequest = (function() { + + /** + * Properties of a ListReleasesRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListReleasesRequest + * @property {string|null} [parent] ListReleasesRequest parent + * @property {number|null} [pageSize] ListReleasesRequest pageSize + * @property {string|null} [pageToken] ListReleasesRequest pageToken + * @property {string|null} [filter] ListReleasesRequest filter + * @property {string|null} [orderBy] ListReleasesRequest orderBy + */ + + /** + * Constructs a new ListReleasesRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListReleasesRequest. + * @implements IListReleasesRequest + * @constructor + * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + */ + function ListReleasesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReleasesRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.parent = ""; + + /** + * ListReleasesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.pageSize = 0; + + /** + * ListReleasesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.pageToken = ""; + + /** + * ListReleasesRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.filter = ""; + + /** + * ListReleasesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + */ + ListReleasesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListReleasesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest instance + */ + ListReleasesRequest.create = function create(properties) { + return new ListReleasesRequest(properties); + }; + + /** + * Encodes the specified ListReleasesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListReleasesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReleasesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReleasesRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReleasesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListReleasesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + */ + ListReleasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListReleasesRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListReleasesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {google.cloud.deploy.v1.ListReleasesRequest} message ListReleasesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReleasesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListReleasesRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @instance + * @returns {Object.} JSON object + */ + ListReleasesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReleasesRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReleasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesRequest"; + }; + + return ListReleasesRequest; + })(); + + v1.ListReleasesResponse = (function() { + + /** + * Properties of a ListReleasesResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListReleasesResponse + * @property {Array.|null} [releases] ListReleasesResponse releases + * @property {string|null} [nextPageToken] ListReleasesResponse nextPageToken + * @property {Array.|null} [unreachable] ListReleasesResponse unreachable + */ + + /** + * Constructs a new ListReleasesResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListReleasesResponse. + * @implements IListReleasesResponse + * @constructor + * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + */ + function ListReleasesResponse(properties) { + this.releases = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReleasesResponse releases. + * @member {Array.} releases + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.releases = $util.emptyArray; + + /** + * ListReleasesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.nextPageToken = ""; + + /** + * ListReleasesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + */ + ListReleasesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReleasesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse instance + */ + ListReleasesResponse.create = function create(properties) { + return new ListReleasesResponse(properties); + }; + + /** + * Encodes the specified ListReleasesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.releases != null && message.releases.length) + for (var i = 0; i < message.releases.length; ++i) + $root.google.cloud.deploy.v1.Release.encode(message.releases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReleasesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReleasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.releases && message.releases.length)) + message.releases = []; + message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReleasesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReleasesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReleasesResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReleasesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.releases != null && message.hasOwnProperty("releases")) { + if (!Array.isArray(message.releases)) + return "releases: array expected"; + for (var i = 0; i < message.releases.length; ++i) { + var error = $root.google.cloud.deploy.v1.Release.verify(message.releases[i]); + if (error) + return "releases." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReleasesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + */ + ListReleasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListReleasesResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + if (object.releases) { + if (!Array.isArray(object.releases)) + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: array expected"); + message.releases = []; + for (var i = 0; i < object.releases.length; ++i) { + if (typeof object.releases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: object expected"); + message.releases[i] = $root.google.cloud.deploy.v1.Release.fromObject(object.releases[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReleasesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {google.cloud.deploy.v1.ListReleasesResponse} message ListReleasesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReleasesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.releases = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.releases && message.releases.length) { + object.releases = []; + for (var j = 0; j < message.releases.length; ++j) + object.releases[j] = $root.google.cloud.deploy.v1.Release.toObject(message.releases[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReleasesResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @instance + * @returns {Object.} JSON object + */ + ListReleasesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReleasesResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReleasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesResponse"; + }; + + return ListReleasesResponse; + })(); + + v1.GetReleaseRequest = (function() { + + /** + * Properties of a GetReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetReleaseRequest + * @property {string|null} [name] GetReleaseRequest name + */ + + /** + * Constructs a new GetReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetReleaseRequest. + * @implements IGetReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + */ + function GetReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReleaseRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @instance + */ + GetReleaseRequest.prototype.name = ""; + + /** + * Creates a new GetReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest instance + */ + GetReleaseRequest.create = function create(properties) { + return new GetReleaseRequest(properties); + }; + + /** + * Encodes the specified GetReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReleaseRequest.encode = function encode(message, writer) { + 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 GetReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + 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 GetReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReleaseRequest.verify = function verify(message) { + if (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 GetReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + */ + GetReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {google.cloud.deploy.v1.GetReleaseRequest} message GetReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReleaseRequest.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 GetReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @instance + * @returns {Object.} JSON object + */ + GetReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetReleaseRequest"; + }; + + return GetReleaseRequest; + })(); + + v1.CreateReleaseRequest = (function() { + + /** + * Properties of a CreateReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface ICreateReleaseRequest + * @property {string|null} [parent] CreateReleaseRequest parent + * @property {string|null} [releaseId] CreateReleaseRequest releaseId + * @property {google.cloud.deploy.v1.IRelease|null} [release] CreateReleaseRequest release + * @property {string|null} [requestId] CreateReleaseRequest requestId + * @property {boolean|null} [validateOnly] CreateReleaseRequest validateOnly + */ + + /** + * Constructs a new CreateReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateReleaseRequest. + * @implements ICreateReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + */ + function CreateReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReleaseRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.parent = ""; + + /** + * CreateReleaseRequest releaseId. + * @member {string} releaseId + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.releaseId = ""; + + /** + * CreateReleaseRequest release. + * @member {google.cloud.deploy.v1.IRelease|null|undefined} release + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.release = null; + + /** + * CreateReleaseRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.requestId = ""; + + /** + * CreateReleaseRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + */ + CreateReleaseRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest instance + */ + CreateReleaseRequest.create = function create(properties) { + return new CreateReleaseRequest(properties); + }; + + /** + * Encodes the specified CreateReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReleaseRequest.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.releaseId != null && Object.hasOwnProperty.call(message, "releaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.releaseId); + if (message.release != null && Object.hasOwnProperty.call(message, "release")) + $root.google.cloud.deploy.v1.Release.encode(message.release, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.releaseId = reader.string(); + break; + } + case 3: { + message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReleaseRequest.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.releaseId != null && message.hasOwnProperty("releaseId")) + if (!$util.isString(message.releaseId)) + return "releaseId: string expected"; + if (message.release != null && message.hasOwnProperty("release")) { + var error = $root.google.cloud.deploy.v1.Release.verify(message.release); + if (error) + return "release." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + */ + CreateReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.releaseId != null) + message.releaseId = String(object.releaseId); + if (object.release != null) { + if (typeof object.release !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateReleaseRequest.release: object expected"); + message.release = $root.google.cloud.deploy.v1.Release.fromObject(object.release); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateReleaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {google.cloud.deploy.v1.CreateReleaseRequest} message CreateReleaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReleaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.releaseId = ""; + object.release = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.releaseId != null && message.hasOwnProperty("releaseId")) + object.releaseId = message.releaseId; + if (message.release != null && message.hasOwnProperty("release")) + object.release = $root.google.cloud.deploy.v1.Release.toObject(message.release, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateReleaseRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReleaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReleaseRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateReleaseRequest"; + }; + + return CreateReleaseRequest; + })(); + + v1.Rollout = (function() { + + /** + * Properties of a Rollout. + * @memberof google.cloud.deploy.v1 + * @interface IRollout + * @property {string|null} [name] Rollout name + * @property {string|null} [uid] Rollout uid + * @property {string|null} [description] Rollout description + * @property {Object.|null} [annotations] Rollout annotations + * @property {Object.|null} [labels] Rollout labels + * @property {google.protobuf.ITimestamp|null} [createTime] Rollout createTime + * @property {google.protobuf.ITimestamp|null} [approveTime] Rollout approveTime + * @property {google.protobuf.ITimestamp|null} [enqueueTime] Rollout enqueueTime + * @property {google.protobuf.ITimestamp|null} [deployStartTime] Rollout deployStartTime + * @property {google.protobuf.ITimestamp|null} [deployEndTime] Rollout deployEndTime + * @property {string|null} [targetId] Rollout targetId + * @property {google.cloud.deploy.v1.Rollout.ApprovalState|null} [approvalState] Rollout approvalState + * @property {google.cloud.deploy.v1.Rollout.State|null} [state] Rollout state + * @property {string|null} [failureReason] Rollout failureReason + * @property {string|null} [deployingBuild] Rollout deployingBuild + * @property {string|null} [etag] Rollout etag + * @property {google.cloud.deploy.v1.Rollout.FailureCause|null} [deployFailureCause] Rollout deployFailureCause + * @property {Array.|null} [phases] Rollout phases + * @property {google.cloud.deploy.v1.IMetadata|null} [metadata] Rollout metadata + * @property {string|null} [controllerRollout] Rollout controllerRollout + * @property {string|null} [rollbackOfRollout] Rollout rollbackOfRollout + * @property {Array.|null} [rolledBackByRollouts] Rollout rolledBackByRollouts + */ + + /** + * Constructs a new Rollout. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Rollout. + * @implements IRollout + * @constructor + * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + */ + function Rollout(properties) { + this.annotations = {}; + this.labels = {}; + this.phases = []; + this.rolledBackByRollouts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Rollout name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.name = ""; + + /** + * Rollout uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.uid = ""; + + /** + * Rollout description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.description = ""; + + /** + * Rollout annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.annotations = $util.emptyObject; + + /** + * Rollout labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.labels = $util.emptyObject; + + /** + * Rollout createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.createTime = null; + + /** + * Rollout approveTime. + * @member {google.protobuf.ITimestamp|null|undefined} approveTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.approveTime = null; + + /** + * Rollout enqueueTime. + * @member {google.protobuf.ITimestamp|null|undefined} enqueueTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.enqueueTime = null; + + /** + * Rollout deployStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployStartTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployStartTime = null; + + /** + * Rollout deployEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} deployEndTime + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployEndTime = null; + + /** + * Rollout targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.targetId = ""; + + /** + * Rollout approvalState. + * @member {google.cloud.deploy.v1.Rollout.ApprovalState} approvalState + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.approvalState = 0; + + /** + * Rollout state. + * @member {google.cloud.deploy.v1.Rollout.State} state + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.state = 0; + + /** + * Rollout failureReason. + * @member {string} failureReason + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.failureReason = ""; + + /** + * Rollout deployingBuild. + * @member {string} deployingBuild + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployingBuild = ""; + + /** + * Rollout etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.etag = ""; + + /** + * Rollout deployFailureCause. + * @member {google.cloud.deploy.v1.Rollout.FailureCause} deployFailureCause + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.deployFailureCause = 0; + + /** + * Rollout phases. + * @member {Array.} phases + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.phases = $util.emptyArray; + + /** + * Rollout metadata. + * @member {google.cloud.deploy.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.metadata = null; + + /** + * Rollout controllerRollout. + * @member {string} controllerRollout + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.controllerRollout = ""; + + /** + * Rollout rollbackOfRollout. + * @member {string} rollbackOfRollout + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.rollbackOfRollout = ""; + + /** + * Rollout rolledBackByRollouts. + * @member {Array.} rolledBackByRollouts + * @memberof google.cloud.deploy.v1.Rollout + * @instance + */ + Rollout.prototype.rolledBackByRollouts = $util.emptyArray; + + /** + * Creates a new Rollout instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Rollout} Rollout instance + */ + Rollout.create = function create(properties) { + return new Rollout(properties); + }; + + /** + * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encode = function encode(message, writer) { + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + 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.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.approveTime != null && Object.hasOwnProperty.call(message, "approveTime")) + $root.google.protobuf.Timestamp.encode(message.approveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enqueueTime != null && Object.hasOwnProperty.call(message, "enqueueTime")) + $root.google.protobuf.Timestamp.encode(message.enqueueTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deployStartTime != null && Object.hasOwnProperty.call(message, "deployStartTime")) + $root.google.protobuf.Timestamp.encode(message.deployStartTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deployEndTime != null && Object.hasOwnProperty.call(message, "deployEndTime")) + $root.google.protobuf.Timestamp.encode(message.deployEndTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.approvalState != null && Object.hasOwnProperty.call(message, "approvalState")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.approvalState); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); + if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.failureReason); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); + if (message.deployingBuild != null && Object.hasOwnProperty.call(message, "deployingBuild")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.deployingBuild); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.targetId); + if (message.deployFailureCause != null && Object.hasOwnProperty.call(message, "deployFailureCause")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.deployFailureCause); + if (message.phases != null && message.phases.length) + for (var i = 0; i < message.phases.length; ++i) + $root.google.cloud.deploy.v1.Phase.encode(message.phases[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.deploy.v1.Metadata.encode(message.metadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.controllerRollout != null && Object.hasOwnProperty.call(message, "controllerRollout")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.controllerRollout); + if (message.rollbackOfRollout != null && Object.hasOwnProperty.call(message, "rollbackOfRollout")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.rollbackOfRollout); + if (message.rolledBackByRollouts != null && message.rolledBackByRollouts.length) + for (var i = 0; i < message.rolledBackByRollouts.length; ++i) + writer.uint32(/* id 27, wireType 2 =*/218).string(message.rolledBackByRollouts[i]); + return writer; + }; + + /** + * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rollout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Rollout message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Rollout(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = 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: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + message.targetId = reader.string(); + break; + } + case 12: { + message.approvalState = reader.int32(); + break; + } + case 13: { + message.state = reader.int32(); + break; + } + case 14: { + message.failureReason = reader.string(); + break; + } + case 17: { + message.deployingBuild = reader.string(); + break; + } + case 16: { + message.etag = reader.string(); + break; + } + case 19: { + message.deployFailureCause = reader.int32(); + break; + } + case 23: { + if (!(message.phases && message.phases.length)) + message.phases = []; + message.phases.push($root.google.cloud.deploy.v1.Phase.decode(reader, reader.uint32())); + break; + } + case 24: { + message.metadata = $root.google.cloud.deploy.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 25: { + message.controllerRollout = reader.string(); + break; + } + case 26: { + message.rollbackOfRollout = reader.string(); + break; + } + case 27: { + if (!(message.rolledBackByRollouts && message.rolledBackByRollouts.length)) + message.rolledBackByRollouts = []; + message.rolledBackByRollouts.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Rollout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rollout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Rollout message. + * @function verify + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rollout.verify = function verify(message) { + if (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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.approveTime != null && message.hasOwnProperty("approveTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.approveTime); + if (error) + return "approveTime." + error; + } + if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.enqueueTime); + if (error) + return "enqueueTime." + error; + } + if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployStartTime); + if (error) + return "deployStartTime." + error; + } + if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deployEndTime); + if (error) + return "deployEndTime." + error; + } + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.approvalState != null && message.hasOwnProperty("approvalState")) + switch (message.approvalState) { + default: + return "approvalState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + if (!$util.isString(message.failureReason)) + return "failureReason: string expected"; + if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) + if (!$util.isString(message.deployingBuild)) + return "deployingBuild: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) + switch (message.deployFailureCause) { + default: + return "deployFailureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.phases != null && message.hasOwnProperty("phases")) { + if (!Array.isArray(message.phases)) + return "phases: array expected"; + for (var i = 0; i < message.phases.length; ++i) { + var error = $root.google.cloud.deploy.v1.Phase.verify(message.phases[i]); + if (error) + return "phases." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.cloud.deploy.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.controllerRollout != null && message.hasOwnProperty("controllerRollout")) + if (!$util.isString(message.controllerRollout)) + return "controllerRollout: string expected"; + if (message.rollbackOfRollout != null && message.hasOwnProperty("rollbackOfRollout")) + if (!$util.isString(message.rollbackOfRollout)) + return "rollbackOfRollout: string expected"; + if (message.rolledBackByRollouts != null && message.hasOwnProperty("rolledBackByRollouts")) { + if (!Array.isArray(message.rolledBackByRollouts)) + return "rolledBackByRollouts: array expected"; + for (var i = 0; i < message.rolledBackByRollouts.length; ++i) + if (!$util.isString(message.rolledBackByRollouts[i])) + return "rolledBackByRollouts: string[] expected"; + } + return null; + }; + + /** + * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Rollout} Rollout + */ + Rollout.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Rollout) + return object; + var message = new $root.google.cloud.deploy.v1.Rollout(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.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.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.approveTime != null) { + if (typeof object.approveTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.approveTime: object expected"); + message.approveTime = $root.google.protobuf.Timestamp.fromObject(object.approveTime); + } + if (object.enqueueTime != null) { + if (typeof object.enqueueTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.enqueueTime: object expected"); + message.enqueueTime = $root.google.protobuf.Timestamp.fromObject(object.enqueueTime); + } + if (object.deployStartTime != null) { + if (typeof object.deployStartTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.deployStartTime: object expected"); + message.deployStartTime = $root.google.protobuf.Timestamp.fromObject(object.deployStartTime); + } + if (object.deployEndTime != null) { + if (typeof object.deployEndTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.deployEndTime: object expected"); + message.deployEndTime = $root.google.protobuf.Timestamp.fromObject(object.deployEndTime); + } + if (object.targetId != null) + message.targetId = String(object.targetId); + switch (object.approvalState) { + default: + if (typeof object.approvalState === "number") { + message.approvalState = object.approvalState; + break; + } + break; + case "APPROVAL_STATE_UNSPECIFIED": + case 0: + message.approvalState = 0; + break; + case "NEEDS_APPROVAL": + case 1: + message.approvalState = 1; + break; + case "DOES_NOT_NEED_APPROVAL": + case 2: + message.approvalState = 2; + break; + case "APPROVED": + case 3: + message.approvalState = 3; + break; + case "REJECTED": + case 4: + message.approvalState = 4; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "IN_PROGRESS": + case 3: + message.state = 3; + break; + case "PENDING_APPROVAL": + case 4: + message.state = 4; + break; + case "APPROVAL_REJECTED": + case 5: + message.state = 5; + break; + case "PENDING": + case 6: + message.state = 6; + break; + case "PENDING_RELEASE": + case 7: + message.state = 7; + break; + case "CANCELLING": + case 8: + message.state = 8; + break; + case "CANCELLED": + case 9: + message.state = 9; + break; + case "HALTED": + case 10: + message.state = 10; + break; + } + if (object.failureReason != null) + message.failureReason = String(object.failureReason); + if (object.deployingBuild != null) + message.deployingBuild = String(object.deployingBuild); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.deployFailureCause) { + default: + if (typeof object.deployFailureCause === "number") { + message.deployFailureCause = object.deployFailureCause; + break; + } + break; + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.deployFailureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.deployFailureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.deployFailureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.deployFailureCause = 3; + break; + case "RELEASE_FAILED": + case 4: + message.deployFailureCause = 4; + break; + case "RELEASE_ABANDONED": + case 5: + message.deployFailureCause = 5; + break; + case "VERIFICATION_CONFIG_NOT_FOUND": + case 6: + message.deployFailureCause = 6; + break; + case "CLOUD_BUILD_REQUEST_FAILED": + case 7: + message.deployFailureCause = 7; + break; + } + if (object.phases) { + if (!Array.isArray(object.phases)) + throw TypeError(".google.cloud.deploy.v1.Rollout.phases: array expected"); + message.phases = []; + for (var i = 0; i < object.phases.length; ++i) { + if (typeof object.phases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.phases: object expected"); + message.phases[i] = $root.google.cloud.deploy.v1.Phase.fromObject(object.phases[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.deploy.v1.Rollout.metadata: object expected"); + message.metadata = $root.google.cloud.deploy.v1.Metadata.fromObject(object.metadata); + } + if (object.controllerRollout != null) + message.controllerRollout = String(object.controllerRollout); + if (object.rollbackOfRollout != null) + message.rollbackOfRollout = String(object.rollbackOfRollout); + if (object.rolledBackByRollouts) { + if (!Array.isArray(object.rolledBackByRollouts)) + throw TypeError(".google.cloud.deploy.v1.Rollout.rolledBackByRollouts: array expected"); + message.rolledBackByRollouts = []; + for (var i = 0; i < object.rolledBackByRollouts.length; ++i) + message.rolledBackByRollouts[i] = String(object.rolledBackByRollouts[i]); + } + return message; + }; + + /** + * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {google.cloud.deploy.v1.Rollout} message Rollout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rollout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.phases = []; + object.rolledBackByRollouts = []; + } + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.approveTime = null; + object.enqueueTime = null; + object.deployStartTime = null; + object.deployEndTime = null; + object.approvalState = options.enums === String ? "APPROVAL_STATE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.failureReason = ""; + object.etag = ""; + object.deployingBuild = ""; + object.targetId = ""; + object.deployFailureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.metadata = null; + object.controllerRollout = ""; + object.rollbackOfRollout = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.approveTime != null && message.hasOwnProperty("approveTime")) + object.approveTime = $root.google.protobuf.Timestamp.toObject(message.approveTime, options); + if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) + object.enqueueTime = $root.google.protobuf.Timestamp.toObject(message.enqueueTime, options); + if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) + object.deployStartTime = $root.google.protobuf.Timestamp.toObject(message.deployStartTime, options); + if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) + object.deployEndTime = $root.google.protobuf.Timestamp.toObject(message.deployEndTime, options); + if (message.approvalState != null && message.hasOwnProperty("approvalState")) + object.approvalState = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] === undefined ? message.approvalState : $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] : message.approvalState; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.Rollout.State[message.state] : message.state; + if (message.failureReason != null && message.hasOwnProperty("failureReason")) + object.failureReason = message.failureReason; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) + object.deployingBuild = message.deployingBuild; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) + object.deployFailureCause = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] === undefined ? message.deployFailureCause : $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] : message.deployFailureCause; + if (message.phases && message.phases.length) { + object.phases = []; + for (var j = 0; j < message.phases.length; ++j) + object.phases[j] = $root.google.cloud.deploy.v1.Phase.toObject(message.phases[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.deploy.v1.Metadata.toObject(message.metadata, options); + if (message.controllerRollout != null && message.hasOwnProperty("controllerRollout")) + object.controllerRollout = message.controllerRollout; + if (message.rollbackOfRollout != null && message.hasOwnProperty("rollbackOfRollout")) + object.rollbackOfRollout = message.rollbackOfRollout; + if (message.rolledBackByRollouts && message.rolledBackByRollouts.length) { + object.rolledBackByRollouts = []; + for (var j = 0; j < message.rolledBackByRollouts.length; ++j) + object.rolledBackByRollouts[j] = message.rolledBackByRollouts[j]; + } + return object; + }; + + /** + * Converts this Rollout to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Rollout + * @instance + * @returns {Object.} JSON object + */ + Rollout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Rollout + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Rollout + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Rollout"; + }; + + /** + * ApprovalState enum. + * @name google.cloud.deploy.v1.Rollout.ApprovalState + * @enum {number} + * @property {number} APPROVAL_STATE_UNSPECIFIED=0 APPROVAL_STATE_UNSPECIFIED value + * @property {number} NEEDS_APPROVAL=1 NEEDS_APPROVAL value + * @property {number} DOES_NOT_NEED_APPROVAL=2 DOES_NOT_NEED_APPROVAL value + * @property {number} APPROVED=3 APPROVED value + * @property {number} REJECTED=4 REJECTED value + */ + Rollout.ApprovalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "APPROVAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEEDS_APPROVAL"] = 1; + values[valuesById[2] = "DOES_NOT_NEED_APPROVAL"] = 2; + values[valuesById[3] = "APPROVED"] = 3; + values[valuesById[4] = "REJECTED"] = 4; + return values; + })(); + + /** + * State enum. + * @name google.cloud.deploy.v1.Rollout.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} PENDING_APPROVAL=4 PENDING_APPROVAL value + * @property {number} APPROVAL_REJECTED=5 APPROVAL_REJECTED value + * @property {number} PENDING=6 PENDING value + * @property {number} PENDING_RELEASE=7 PENDING_RELEASE value + * @property {number} CANCELLING=8 CANCELLING value + * @property {number} CANCELLED=9 CANCELLED value + * @property {number} HALTED=10 HALTED value + */ + Rollout.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "PENDING_APPROVAL"] = 4; + values[valuesById[5] = "APPROVAL_REJECTED"] = 5; + values[valuesById[6] = "PENDING"] = 6; + values[valuesById[7] = "PENDING_RELEASE"] = 7; + values[valuesById[8] = "CANCELLING"] = 8; + values[valuesById[9] = "CANCELLED"] = 9; + values[valuesById[10] = "HALTED"] = 10; + return values; + })(); + + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.Rollout.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} RELEASE_FAILED=4 RELEASE_FAILED value + * @property {number} RELEASE_ABANDONED=5 RELEASE_ABANDONED value + * @property {number} VERIFICATION_CONFIG_NOT_FOUND=6 VERIFICATION_CONFIG_NOT_FOUND value + * @property {number} CLOUD_BUILD_REQUEST_FAILED=7 CLOUD_BUILD_REQUEST_FAILED value + */ + Rollout.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "RELEASE_FAILED"] = 4; + values[valuesById[5] = "RELEASE_ABANDONED"] = 5; + values[valuesById[6] = "VERIFICATION_CONFIG_NOT_FOUND"] = 6; + values[valuesById[7] = "CLOUD_BUILD_REQUEST_FAILED"] = 7; + return values; + })(); + + return Rollout; + })(); + + v1.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.deploy.v1 + * @interface IMetadata + * @property {google.cloud.deploy.v1.ICloudRunMetadata|null} [cloudRun] Metadata cloudRun + * @property {google.cloud.deploy.v1.IAutomationRolloutMetadata|null} [automation] Metadata automation + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.deploy.v1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata cloudRun. + * @member {google.cloud.deploy.v1.ICloudRunMetadata|null|undefined} cloudRun + * @memberof google.cloud.deploy.v1.Metadata + * @instance + */ + Metadata.prototype.cloudRun = null; + + /** + * Metadata automation. + * @member {google.cloud.deploy.v1.IAutomationRolloutMetadata|null|undefined} automation + * @memberof google.cloud.deploy.v1.Metadata + * @instance + */ + Metadata.prototype.automation = null; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) + $root.google.cloud.deploy.v1.CloudRunMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.automation != null && Object.hasOwnProperty.call(message, "automation")) + $root.google.cloud.deploy.v1.AutomationRolloutMetadata.encode(message.automation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.automation = $root.google.cloud.deploy.v1.AutomationRolloutMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + var error = $root.google.cloud.deploy.v1.CloudRunMetadata.verify(message.cloudRun); + if (error) + return "cloudRun." + error; + } + if (message.automation != null && message.hasOwnProperty("automation")) { + var error = $root.google.cloud.deploy.v1.AutomationRolloutMetadata.verify(message.automation); + if (error) + return "automation." + error; + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Metadata) + return object; + var message = new $root.google.cloud.deploy.v1.Metadata(); + if (object.cloudRun != null) { + if (typeof object.cloudRun !== "object") + throw TypeError(".google.cloud.deploy.v1.Metadata.cloudRun: object expected"); + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.fromObject(object.cloudRun); + } + if (object.automation != null) { + if (typeof object.automation !== "object") + throw TypeError(".google.cloud.deploy.v1.Metadata.automation: object expected"); + message.automation = $root.google.cloud.deploy.v1.AutomationRolloutMetadata.fromObject(object.automation); + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {google.cloud.deploy.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cloudRun = null; + object.automation = null; + } + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) + object.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.toObject(message.cloudRun, options); + if (message.automation != null && message.hasOwnProperty("automation")) + object.automation = $root.google.cloud.deploy.v1.AutomationRolloutMetadata.toObject(message.automation, options); + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Metadata"; + }; + + return Metadata; + })(); + + v1.DeployJobRunMetadata = (function() { + + /** + * Properties of a DeployJobRunMetadata. + * @memberof google.cloud.deploy.v1 + * @interface IDeployJobRunMetadata + * @property {google.cloud.deploy.v1.ICloudRunMetadata|null} [cloudRun] DeployJobRunMetadata cloudRun + */ + + /** + * Constructs a new DeployJobRunMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployJobRunMetadata. + * @implements IDeployJobRunMetadata + * @constructor + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata=} [properties] Properties to set + */ + function DeployJobRunMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployJobRunMetadata cloudRun. + * @member {google.cloud.deploy.v1.ICloudRunMetadata|null|undefined} cloudRun + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @instance + */ + DeployJobRunMetadata.prototype.cloudRun = null; + + /** + * Creates a new DeployJobRunMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata instance + */ + DeployJobRunMetadata.create = function create(properties) { + return new DeployJobRunMetadata(properties); + }; + + /** + * Encodes the specified DeployJobRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata} message DeployJobRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJobRunMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) + $root.google.cloud.deploy.v1.CloudRunMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeployJobRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.IDeployJobRunMetadata} message DeployJobRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJobRunMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployJobRunMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJobRunMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJobRunMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployJobRunMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJobRunMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployJobRunMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployJobRunMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + var error = $root.google.cloud.deploy.v1.CloudRunMetadata.verify(message.cloudRun); + if (error) + return "cloudRun." + error; + } + return null; + }; + + /** + * Creates a DeployJobRunMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + */ + DeployJobRunMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployJobRunMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.DeployJobRunMetadata(); + if (object.cloudRun != null) { + if (typeof object.cloudRun !== "object") + throw TypeError(".google.cloud.deploy.v1.DeployJobRunMetadata.cloudRun: object expected"); + message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.fromObject(object.cloudRun); + } + return message; + }; + + /** + * Creates a plain object from a DeployJobRunMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {google.cloud.deploy.v1.DeployJobRunMetadata} message DeployJobRunMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployJobRunMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cloudRun = null; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) + object.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.toObject(message.cloudRun, options); + return object; + }; + + /** + * Converts this DeployJobRunMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @instance + * @returns {Object.} JSON object + */ + DeployJobRunMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployJobRunMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployJobRunMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJobRunMetadata"; + }; + + return DeployJobRunMetadata; + })(); + + v1.CloudRunMetadata = (function() { + + /** + * Properties of a CloudRunMetadata. + * @memberof google.cloud.deploy.v1 + * @interface ICloudRunMetadata + * @property {string|null} [service] CloudRunMetadata service + * @property {Array.|null} [serviceUrls] CloudRunMetadata serviceUrls + * @property {string|null} [revision] CloudRunMetadata revision + * @property {string|null} [job] CloudRunMetadata job + */ + + /** + * Constructs a new CloudRunMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CloudRunMetadata. + * @implements ICloudRunMetadata + * @constructor + * @param {google.cloud.deploy.v1.ICloudRunMetadata=} [properties] Properties to set + */ + function CloudRunMetadata(properties) { + this.serviceUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunMetadata service. + * @member {string} service + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.service = ""; + + /** + * CloudRunMetadata serviceUrls. + * @member {Array.} serviceUrls + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.serviceUrls = $util.emptyArray; + + /** + * CloudRunMetadata revision. + * @member {string} revision + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.revision = ""; + + /** + * CloudRunMetadata job. + * @member {string} job + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + */ + CloudRunMetadata.prototype.job = ""; + + /** + * Creates a new CloudRunMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata instance + */ + CloudRunMetadata.create = function create(properties) { + return new CloudRunMetadata(properties); + }; + + /** + * Encodes the specified CloudRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunMetadata} message CloudRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.serviceUrls != null && message.serviceUrls.length) + for (var i = 0; i < message.serviceUrls.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceUrls[i]); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + if (message.job != null && Object.hasOwnProperty.call(message, "job")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.job); + return writer; + }; + + /** + * Encodes the specified CloudRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.ICloudRunMetadata} message CloudRunMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 2: { + if (!(message.serviceUrls && message.serviceUrls.length)) + message.serviceUrls = []; + message.serviceUrls.push(reader.string()); + break; + } + case 3: { + message.revision = reader.string(); + break; + } + case 4: { + message.job = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.serviceUrls != null && message.hasOwnProperty("serviceUrls")) { + if (!Array.isArray(message.serviceUrls)) + return "serviceUrls: array expected"; + for (var i = 0; i < message.serviceUrls.length; ++i) + if (!$util.isString(message.serviceUrls[i])) + return "serviceUrls: string[] expected"; + } + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isString(message.revision)) + return "revision: string expected"; + if (message.job != null && message.hasOwnProperty("job")) + if (!$util.isString(message.job)) + return "job: string expected"; + return null; + }; + + /** + * Creates a CloudRunMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + */ + CloudRunMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CloudRunMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.CloudRunMetadata(); + if (object.service != null) + message.service = String(object.service); + if (object.serviceUrls) { + if (!Array.isArray(object.serviceUrls)) + throw TypeError(".google.cloud.deploy.v1.CloudRunMetadata.serviceUrls: array expected"); + message.serviceUrls = []; + for (var i = 0; i < object.serviceUrls.length; ++i) + message.serviceUrls[i] = String(object.serviceUrls[i]); + } + if (object.revision != null) + message.revision = String(object.revision); + if (object.job != null) + message.job = String(object.job); + return message; + }; + + /** + * Creates a plain object from a CloudRunMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {google.cloud.deploy.v1.CloudRunMetadata} message CloudRunMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.serviceUrls = []; + if (options.defaults) { + object.service = ""; + object.revision = ""; + object.job = ""; + } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.serviceUrls && message.serviceUrls.length) { + object.serviceUrls = []; + for (var j = 0; j < message.serviceUrls.length; ++j) + object.serviceUrls[j] = message.serviceUrls[j]; + } + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + if (message.job != null && message.hasOwnProperty("job")) + object.job = message.job; + return object; + }; + + /** + * Converts this CloudRunMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @instance + * @returns {Object.} JSON object + */ + CloudRunMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunMetadata"; + }; + + return CloudRunMetadata; + })(); + + v1.AutomationRolloutMetadata = (function() { + + /** + * Properties of an AutomationRolloutMetadata. + * @memberof google.cloud.deploy.v1 + * @interface IAutomationRolloutMetadata + * @property {string|null} [promoteAutomationRun] AutomationRolloutMetadata promoteAutomationRun + * @property {Array.|null} [advanceAutomationRuns] AutomationRolloutMetadata advanceAutomationRuns + * @property {Array.|null} [repairAutomationRuns] AutomationRolloutMetadata repairAutomationRuns + */ + + /** + * Constructs a new AutomationRolloutMetadata. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AutomationRolloutMetadata. + * @implements IAutomationRolloutMetadata + * @constructor + * @param {google.cloud.deploy.v1.IAutomationRolloutMetadata=} [properties] Properties to set + */ + function AutomationRolloutMetadata(properties) { + this.advanceAutomationRuns = []; + this.repairAutomationRuns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutomationRolloutMetadata promoteAutomationRun. + * @member {string} promoteAutomationRun + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @instance + */ + AutomationRolloutMetadata.prototype.promoteAutomationRun = ""; + + /** + * AutomationRolloutMetadata advanceAutomationRuns. + * @member {Array.} advanceAutomationRuns + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @instance + */ + AutomationRolloutMetadata.prototype.advanceAutomationRuns = $util.emptyArray; + + /** + * AutomationRolloutMetadata repairAutomationRuns. + * @member {Array.} repairAutomationRuns + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @instance + */ + AutomationRolloutMetadata.prototype.repairAutomationRuns = $util.emptyArray; + + /** + * Creates a new AutomationRolloutMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {google.cloud.deploy.v1.IAutomationRolloutMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationRolloutMetadata} AutomationRolloutMetadata instance + */ + AutomationRolloutMetadata.create = function create(properties) { + return new AutomationRolloutMetadata(properties); + }; + + /** + * Encodes the specified AutomationRolloutMetadata message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRolloutMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {google.cloud.deploy.v1.IAutomationRolloutMetadata} message AutomationRolloutMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomationRolloutMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.promoteAutomationRun != null && Object.hasOwnProperty.call(message, "promoteAutomationRun")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.promoteAutomationRun); + if (message.advanceAutomationRuns != null && message.advanceAutomationRuns.length) + for (var i = 0; i < message.advanceAutomationRuns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.advanceAutomationRuns[i]); + if (message.repairAutomationRuns != null && message.repairAutomationRuns.length) + for (var i = 0; i < message.repairAutomationRuns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.repairAutomationRuns[i]); + return writer; + }; + + /** + * Encodes the specified AutomationRolloutMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRolloutMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {google.cloud.deploy.v1.IAutomationRolloutMetadata} message AutomationRolloutMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutomationRolloutMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutomationRolloutMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AutomationRolloutMetadata} AutomationRolloutMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomationRolloutMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationRolloutMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.promoteAutomationRun = reader.string(); + break; + } + case 2: { + if (!(message.advanceAutomationRuns && message.advanceAutomationRuns.length)) + message.advanceAutomationRuns = []; + message.advanceAutomationRuns.push(reader.string()); + break; + } + case 3: { + if (!(message.repairAutomationRuns && message.repairAutomationRuns.length)) + message.repairAutomationRuns = []; + message.repairAutomationRuns.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutomationRolloutMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AutomationRolloutMetadata} AutomationRolloutMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutomationRolloutMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutomationRolloutMetadata message. + * @function verify + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutomationRolloutMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.promoteAutomationRun != null && message.hasOwnProperty("promoteAutomationRun")) + if (!$util.isString(message.promoteAutomationRun)) + return "promoteAutomationRun: string expected"; + if (message.advanceAutomationRuns != null && message.hasOwnProperty("advanceAutomationRuns")) { + if (!Array.isArray(message.advanceAutomationRuns)) + return "advanceAutomationRuns: array expected"; + for (var i = 0; i < message.advanceAutomationRuns.length; ++i) + if (!$util.isString(message.advanceAutomationRuns[i])) + return "advanceAutomationRuns: string[] expected"; + } + if (message.repairAutomationRuns != null && message.hasOwnProperty("repairAutomationRuns")) { + if (!Array.isArray(message.repairAutomationRuns)) + return "repairAutomationRuns: array expected"; + for (var i = 0; i < message.repairAutomationRuns.length; ++i) + if (!$util.isString(message.repairAutomationRuns[i])) + return "repairAutomationRuns: string[] expected"; + } + return null; + }; + + /** + * Creates an AutomationRolloutMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AutomationRolloutMetadata} AutomationRolloutMetadata + */ + AutomationRolloutMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationRolloutMetadata) + return object; + var message = new $root.google.cloud.deploy.v1.AutomationRolloutMetadata(); + if (object.promoteAutomationRun != null) + message.promoteAutomationRun = String(object.promoteAutomationRun); + if (object.advanceAutomationRuns) { + if (!Array.isArray(object.advanceAutomationRuns)) + throw TypeError(".google.cloud.deploy.v1.AutomationRolloutMetadata.advanceAutomationRuns: array expected"); + message.advanceAutomationRuns = []; + for (var i = 0; i < object.advanceAutomationRuns.length; ++i) + message.advanceAutomationRuns[i] = String(object.advanceAutomationRuns[i]); + } + if (object.repairAutomationRuns) { + if (!Array.isArray(object.repairAutomationRuns)) + throw TypeError(".google.cloud.deploy.v1.AutomationRolloutMetadata.repairAutomationRuns: array expected"); + message.repairAutomationRuns = []; + for (var i = 0; i < object.repairAutomationRuns.length; ++i) + message.repairAutomationRuns[i] = String(object.repairAutomationRuns[i]); + } + return message; + }; + + /** + * Creates a plain object from an AutomationRolloutMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {google.cloud.deploy.v1.AutomationRolloutMetadata} message AutomationRolloutMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutomationRolloutMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.advanceAutomationRuns = []; + object.repairAutomationRuns = []; + } + if (options.defaults) + object.promoteAutomationRun = ""; + if (message.promoteAutomationRun != null && message.hasOwnProperty("promoteAutomationRun")) + object.promoteAutomationRun = message.promoteAutomationRun; + if (message.advanceAutomationRuns && message.advanceAutomationRuns.length) { + object.advanceAutomationRuns = []; + for (var j = 0; j < message.advanceAutomationRuns.length; ++j) + object.advanceAutomationRuns[j] = message.advanceAutomationRuns[j]; + } + if (message.repairAutomationRuns && message.repairAutomationRuns.length) { + object.repairAutomationRuns = []; + for (var j = 0; j < message.repairAutomationRuns.length; ++j) + object.repairAutomationRuns[j] = message.repairAutomationRuns[j]; + } + return object; + }; + + /** + * Converts this AutomationRolloutMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @instance + * @returns {Object.} JSON object + */ + AutomationRolloutMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutomationRolloutMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AutomationRolloutMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutomationRolloutMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationRolloutMetadata"; + }; + + return AutomationRolloutMetadata; + })(); + + v1.Phase = (function() { + + /** + * Properties of a Phase. + * @memberof google.cloud.deploy.v1 + * @interface IPhase + * @property {string|null} [id] Phase id + * @property {google.cloud.deploy.v1.Phase.State|null} [state] Phase state + * @property {string|null} [skipMessage] Phase skipMessage + * @property {google.cloud.deploy.v1.IDeploymentJobs|null} [deploymentJobs] Phase deploymentJobs + * @property {google.cloud.deploy.v1.IChildRolloutJobs|null} [childRolloutJobs] Phase childRolloutJobs + */ + + /** + * Constructs a new Phase. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Phase. + * @implements IPhase + * @constructor + * @param {google.cloud.deploy.v1.IPhase=} [properties] Properties to set + */ + function Phase(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Phase id. + * @member {string} id + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.id = ""; + + /** + * Phase state. + * @member {google.cloud.deploy.v1.Phase.State} state + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.state = 0; + + /** + * Phase skipMessage. + * @member {string} skipMessage + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.skipMessage = ""; + + /** + * Phase deploymentJobs. + * @member {google.cloud.deploy.v1.IDeploymentJobs|null|undefined} deploymentJobs + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.deploymentJobs = null; + + /** + * Phase childRolloutJobs. + * @member {google.cloud.deploy.v1.IChildRolloutJobs|null|undefined} childRolloutJobs + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Phase.prototype.childRolloutJobs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Phase jobs. + * @member {"deploymentJobs"|"childRolloutJobs"|undefined} jobs + * @memberof google.cloud.deploy.v1.Phase + * @instance + */ + Object.defineProperty(Phase.prototype, "jobs", { + get: $util.oneOfGetter($oneOfFields = ["deploymentJobs", "childRolloutJobs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Phase instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.IPhase=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Phase} Phase instance + */ + Phase.create = function create(properties) { + return new Phase(properties); + }; + + /** + * Encodes the specified Phase message. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.IPhase} message Phase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Phase.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.deploymentJobs != null && Object.hasOwnProperty.call(message, "deploymentJobs")) + $root.google.cloud.deploy.v1.DeploymentJobs.encode(message.deploymentJobs, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.childRolloutJobs != null && Object.hasOwnProperty.call(message, "childRolloutJobs")) + $root.google.cloud.deploy.v1.ChildRolloutJobs.encode(message.childRolloutJobs, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.skipMessage != null && Object.hasOwnProperty.call(message, "skipMessage")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.skipMessage); + return writer; + }; + + /** + * Encodes the specified Phase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.IPhase} message Phase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Phase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Phase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Phase} Phase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Phase.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Phase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 6: { + message.skipMessage = reader.string(); + break; + } + case 4: { + message.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.decode(reader, reader.uint32()); + break; + } + case 5: { + message.childRolloutJobs = $root.google.cloud.deploy.v1.ChildRolloutJobs.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Phase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Phase} Phase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Phase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Phase message. + * @function verify + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Phase.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) + if (!$util.isString(message.skipMessage)) + return "skipMessage: string expected"; + if (message.deploymentJobs != null && message.hasOwnProperty("deploymentJobs")) { + properties.jobs = 1; + { + var error = $root.google.cloud.deploy.v1.DeploymentJobs.verify(message.deploymentJobs); + if (error) + return "deploymentJobs." + error; + } + } + if (message.childRolloutJobs != null && message.hasOwnProperty("childRolloutJobs")) { + if (properties.jobs === 1) + return "jobs: multiple values"; + properties.jobs = 1; + { + var error = $root.google.cloud.deploy.v1.ChildRolloutJobs.verify(message.childRolloutJobs); + if (error) + return "childRolloutJobs." + error; + } + } + return null; + }; + + /** + * Creates a Phase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Phase} Phase + */ + Phase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Phase) + return object; + var message = new $root.google.cloud.deploy.v1.Phase(); + if (object.id != null) + message.id = String(object.id); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "IN_PROGRESS": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "ABORTED": + case 5: + message.state = 5; + break; + case "SKIPPED": + case 6: + message.state = 6; + break; + } + if (object.skipMessage != null) + message.skipMessage = String(object.skipMessage); + if (object.deploymentJobs != null) { + if (typeof object.deploymentJobs !== "object") + throw TypeError(".google.cloud.deploy.v1.Phase.deploymentJobs: object expected"); + message.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.fromObject(object.deploymentJobs); + } + if (object.childRolloutJobs != null) { + if (typeof object.childRolloutJobs !== "object") + throw TypeError(".google.cloud.deploy.v1.Phase.childRolloutJobs: object expected"); + message.childRolloutJobs = $root.google.cloud.deploy.v1.ChildRolloutJobs.fromObject(object.childRolloutJobs); + } + return message; + }; + + /** + * Creates a plain object from a Phase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {google.cloud.deploy.v1.Phase} message Phase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Phase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.skipMessage = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Phase.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.Phase.State[message.state] : message.state; + if (message.deploymentJobs != null && message.hasOwnProperty("deploymentJobs")) { + object.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.toObject(message.deploymentJobs, options); + if (options.oneofs) + object.jobs = "deploymentJobs"; + } + if (message.childRolloutJobs != null && message.hasOwnProperty("childRolloutJobs")) { + object.childRolloutJobs = $root.google.cloud.deploy.v1.ChildRolloutJobs.toObject(message.childRolloutJobs, options); + if (options.oneofs) + object.jobs = "childRolloutJobs"; + } + if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) + object.skipMessage = message.skipMessage; + return object; + }; + + /** + * Converts this Phase to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Phase + * @instance + * @returns {Object.} JSON object + */ + Phase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Phase + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Phase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Phase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Phase"; + }; + + /** + * State enum. + * @name google.cloud.deploy.v1.Phase.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} IN_PROGRESS=2 IN_PROGRESS value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + * @property {number} ABORTED=5 ABORTED value + * @property {number} SKIPPED=6 SKIPPED value + */ + Phase.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "IN_PROGRESS"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "ABORTED"] = 5; + values[valuesById[6] = "SKIPPED"] = 6; + return values; + })(); + + return Phase; + })(); + + v1.DeploymentJobs = (function() { + + /** + * Properties of a DeploymentJobs. + * @memberof google.cloud.deploy.v1 + * @interface IDeploymentJobs + * @property {google.cloud.deploy.v1.IJob|null} [deployJob] DeploymentJobs deployJob + * @property {google.cloud.deploy.v1.IJob|null} [verifyJob] DeploymentJobs verifyJob + * @property {google.cloud.deploy.v1.IJob|null} [predeployJob] DeploymentJobs predeployJob + * @property {google.cloud.deploy.v1.IJob|null} [postdeployJob] DeploymentJobs postdeployJob + */ + + /** + * Constructs a new DeploymentJobs. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeploymentJobs. + * @implements IDeploymentJobs + * @constructor + * @param {google.cloud.deploy.v1.IDeploymentJobs=} [properties] Properties to set + */ + function DeploymentJobs(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeploymentJobs deployJob. + * @member {google.cloud.deploy.v1.IJob|null|undefined} deployJob + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + */ + DeploymentJobs.prototype.deployJob = null; + + /** + * DeploymentJobs verifyJob. + * @member {google.cloud.deploy.v1.IJob|null|undefined} verifyJob + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + */ + DeploymentJobs.prototype.verifyJob = null; + + /** + * DeploymentJobs predeployJob. + * @member {google.cloud.deploy.v1.IJob|null|undefined} predeployJob + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + */ + DeploymentJobs.prototype.predeployJob = null; + + /** + * DeploymentJobs postdeployJob. + * @member {google.cloud.deploy.v1.IJob|null|undefined} postdeployJob + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + */ + DeploymentJobs.prototype.postdeployJob = null; + + /** + * Creates a new DeploymentJobs instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.IDeploymentJobs=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs instance + */ + DeploymentJobs.create = function create(properties) { + return new DeploymentJobs(properties); + }; + + /** + * Encodes the specified DeploymentJobs message. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.IDeploymentJobs} message DeploymentJobs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentJobs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deployJob != null && Object.hasOwnProperty.call(message, "deployJob")) + $root.google.cloud.deploy.v1.Job.encode(message.deployJob, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.verifyJob != null && Object.hasOwnProperty.call(message, "verifyJob")) + $root.google.cloud.deploy.v1.Job.encode(message.verifyJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.predeployJob != null && Object.hasOwnProperty.call(message, "predeployJob")) + $root.google.cloud.deploy.v1.Job.encode(message.predeployJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.postdeployJob != null && Object.hasOwnProperty.call(message, "postdeployJob")) + $root.google.cloud.deploy.v1.Job.encode(message.postdeployJob, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeploymentJobs message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.IDeploymentJobs} message DeploymentJobs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeploymentJobs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeploymentJobs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentJobs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeploymentJobs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + break; + } + case 2: { + message.verifyJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + break; + } + case 3: { + message.predeployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + break; + } + case 4: { + message.postdeployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeploymentJobs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeploymentJobs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeploymentJobs message. + * @function verify + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeploymentJobs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deployJob != null && message.hasOwnProperty("deployJob")) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.deployJob); + if (error) + return "deployJob." + error; + } + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.verifyJob); + if (error) + return "verifyJob." + error; + } + if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.predeployJob); + if (error) + return "predeployJob." + error; + } + if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.postdeployJob); + if (error) + return "postdeployJob." + error; + } + return null; + }; + + /** + * Creates a DeploymentJobs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + */ + DeploymentJobs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeploymentJobs) + return object; + var message = new $root.google.cloud.deploy.v1.DeploymentJobs(); + if (object.deployJob != null) { + if (typeof object.deployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.deployJob: object expected"); + message.deployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.deployJob); + } + if (object.verifyJob != null) { + if (typeof object.verifyJob !== "object") + throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.verifyJob: object expected"); + message.verifyJob = $root.google.cloud.deploy.v1.Job.fromObject(object.verifyJob); + } + if (object.predeployJob != null) { + if (typeof object.predeployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.predeployJob: object expected"); + message.predeployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.predeployJob); + } + if (object.postdeployJob != null) { + if (typeof object.postdeployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.postdeployJob: object expected"); + message.postdeployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.postdeployJob); + } + return message; + }; + + /** + * Creates a plain object from a DeploymentJobs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {google.cloud.deploy.v1.DeploymentJobs} message DeploymentJobs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeploymentJobs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deployJob = null; + object.verifyJob = null; + object.predeployJob = null; + object.postdeployJob = null; + } + if (message.deployJob != null && message.hasOwnProperty("deployJob")) + object.deployJob = $root.google.cloud.deploy.v1.Job.toObject(message.deployJob, options); + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) + object.verifyJob = $root.google.cloud.deploy.v1.Job.toObject(message.verifyJob, options); + if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) + object.predeployJob = $root.google.cloud.deploy.v1.Job.toObject(message.predeployJob, options); + if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) + object.postdeployJob = $root.google.cloud.deploy.v1.Job.toObject(message.postdeployJob, options); + return object; + }; + + /** + * Converts this DeploymentJobs to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @instance + * @returns {Object.} JSON object + */ + DeploymentJobs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeploymentJobs + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeploymentJobs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeploymentJobs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeploymentJobs"; + }; + + return DeploymentJobs; + })(); + + v1.ChildRolloutJobs = (function() { + + /** + * Properties of a ChildRolloutJobs. + * @memberof google.cloud.deploy.v1 + * @interface IChildRolloutJobs + * @property {Array.|null} [createRolloutJobs] ChildRolloutJobs createRolloutJobs + * @property {Array.|null} [advanceRolloutJobs] ChildRolloutJobs advanceRolloutJobs + */ + + /** + * Constructs a new ChildRolloutJobs. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ChildRolloutJobs. + * @implements IChildRolloutJobs + * @constructor + * @param {google.cloud.deploy.v1.IChildRolloutJobs=} [properties] Properties to set + */ + function ChildRolloutJobs(properties) { + this.createRolloutJobs = []; + this.advanceRolloutJobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChildRolloutJobs createRolloutJobs. + * @member {Array.} createRolloutJobs + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @instance + */ + ChildRolloutJobs.prototype.createRolloutJobs = $util.emptyArray; + + /** + * ChildRolloutJobs advanceRolloutJobs. + * @member {Array.} advanceRolloutJobs + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @instance + */ + ChildRolloutJobs.prototype.advanceRolloutJobs = $util.emptyArray; + + /** + * Creates a new ChildRolloutJobs instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {google.cloud.deploy.v1.IChildRolloutJobs=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs instance + */ + ChildRolloutJobs.create = function create(properties) { + return new ChildRolloutJobs(properties); + }; + + /** + * Encodes the specified ChildRolloutJobs message. Does not implicitly {@link google.cloud.deploy.v1.ChildRolloutJobs.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {google.cloud.deploy.v1.IChildRolloutJobs} message ChildRolloutJobs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChildRolloutJobs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createRolloutJobs != null && message.createRolloutJobs.length) + for (var i = 0; i < message.createRolloutJobs.length; ++i) + $root.google.cloud.deploy.v1.Job.encode(message.createRolloutJobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.advanceRolloutJobs != null && message.advanceRolloutJobs.length) + for (var i = 0; i < message.advanceRolloutJobs.length; ++i) + $root.google.cloud.deploy.v1.Job.encode(message.advanceRolloutJobs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChildRolloutJobs message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ChildRolloutJobs.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {google.cloud.deploy.v1.IChildRolloutJobs} message ChildRolloutJobs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChildRolloutJobs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChildRolloutJobs message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChildRolloutJobs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ChildRolloutJobs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.createRolloutJobs && message.createRolloutJobs.length)) + message.createRolloutJobs = []; + message.createRolloutJobs.push($root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.advanceRolloutJobs && message.advanceRolloutJobs.length)) + message.advanceRolloutJobs = []; + message.advanceRolloutJobs.push($root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChildRolloutJobs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChildRolloutJobs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChildRolloutJobs message. + * @function verify + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChildRolloutJobs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createRolloutJobs != null && message.hasOwnProperty("createRolloutJobs")) { + if (!Array.isArray(message.createRolloutJobs)) + return "createRolloutJobs: array expected"; + for (var i = 0; i < message.createRolloutJobs.length; ++i) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.createRolloutJobs[i]); + if (error) + return "createRolloutJobs." + error; + } + } + if (message.advanceRolloutJobs != null && message.hasOwnProperty("advanceRolloutJobs")) { + if (!Array.isArray(message.advanceRolloutJobs)) + return "advanceRolloutJobs: array expected"; + for (var i = 0; i < message.advanceRolloutJobs.length; ++i) { + var error = $root.google.cloud.deploy.v1.Job.verify(message.advanceRolloutJobs[i]); + if (error) + return "advanceRolloutJobs." + error; + } + } + return null; + }; + + /** + * Creates a ChildRolloutJobs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs + */ + ChildRolloutJobs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ChildRolloutJobs) + return object; + var message = new $root.google.cloud.deploy.v1.ChildRolloutJobs(); + if (object.createRolloutJobs) { + if (!Array.isArray(object.createRolloutJobs)) + throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.createRolloutJobs: array expected"); + message.createRolloutJobs = []; + for (var i = 0; i < object.createRolloutJobs.length; ++i) { + if (typeof object.createRolloutJobs[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.createRolloutJobs: object expected"); + message.createRolloutJobs[i] = $root.google.cloud.deploy.v1.Job.fromObject(object.createRolloutJobs[i]); + } + } + if (object.advanceRolloutJobs) { + if (!Array.isArray(object.advanceRolloutJobs)) + throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.advanceRolloutJobs: array expected"); + message.advanceRolloutJobs = []; + for (var i = 0; i < object.advanceRolloutJobs.length; ++i) { + if (typeof object.advanceRolloutJobs[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.advanceRolloutJobs: object expected"); + message.advanceRolloutJobs[i] = $root.google.cloud.deploy.v1.Job.fromObject(object.advanceRolloutJobs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChildRolloutJobs message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {google.cloud.deploy.v1.ChildRolloutJobs} message ChildRolloutJobs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChildRolloutJobs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.createRolloutJobs = []; + object.advanceRolloutJobs = []; + } + if (message.createRolloutJobs && message.createRolloutJobs.length) { + object.createRolloutJobs = []; + for (var j = 0; j < message.createRolloutJobs.length; ++j) + object.createRolloutJobs[j] = $root.google.cloud.deploy.v1.Job.toObject(message.createRolloutJobs[j], options); + } + if (message.advanceRolloutJobs && message.advanceRolloutJobs.length) { + object.advanceRolloutJobs = []; + for (var j = 0; j < message.advanceRolloutJobs.length; ++j) + object.advanceRolloutJobs[j] = $root.google.cloud.deploy.v1.Job.toObject(message.advanceRolloutJobs[j], options); + } + return object; + }; + + /** + * Converts this ChildRolloutJobs to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @instance + * @returns {Object.} JSON object + */ + ChildRolloutJobs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChildRolloutJobs + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChildRolloutJobs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ChildRolloutJobs"; + }; + + return ChildRolloutJobs; + })(); + + v1.Job = (function() { + + /** + * Properties of a Job. + * @memberof google.cloud.deploy.v1 + * @interface IJob + * @property {string|null} [id] Job id + * @property {google.cloud.deploy.v1.Job.State|null} [state] Job state + * @property {string|null} [skipMessage] Job skipMessage + * @property {string|null} [jobRun] Job jobRun + * @property {google.cloud.deploy.v1.IDeployJob|null} [deployJob] Job deployJob + * @property {google.cloud.deploy.v1.IVerifyJob|null} [verifyJob] Job verifyJob + * @property {google.cloud.deploy.v1.IPredeployJob|null} [predeployJob] Job predeployJob + * @property {google.cloud.deploy.v1.IPostdeployJob|null} [postdeployJob] Job postdeployJob + * @property {google.cloud.deploy.v1.ICreateChildRolloutJob|null} [createChildRolloutJob] Job createChildRolloutJob + * @property {google.cloud.deploy.v1.IAdvanceChildRolloutJob|null} [advanceChildRolloutJob] Job advanceChildRolloutJob + */ + + /** + * Constructs a new Job. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a Job. + * @implements IJob + * @constructor + * @param {google.cloud.deploy.v1.IJob=} [properties] Properties to set + */ + function Job(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Job id. + * @member {string} id + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.id = ""; + + /** + * Job state. + * @member {google.cloud.deploy.v1.Job.State} state + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.state = 0; + + /** + * Job skipMessage. + * @member {string} skipMessage + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.skipMessage = ""; + + /** + * Job jobRun. + * @member {string} jobRun + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.jobRun = ""; + + /** + * Job deployJob. + * @member {google.cloud.deploy.v1.IDeployJob|null|undefined} deployJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.deployJob = null; + + /** + * Job verifyJob. + * @member {google.cloud.deploy.v1.IVerifyJob|null|undefined} verifyJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.verifyJob = null; + + /** + * Job predeployJob. + * @member {google.cloud.deploy.v1.IPredeployJob|null|undefined} predeployJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.predeployJob = null; + + /** + * Job postdeployJob. + * @member {google.cloud.deploy.v1.IPostdeployJob|null|undefined} postdeployJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.postdeployJob = null; + + /** + * Job createChildRolloutJob. + * @member {google.cloud.deploy.v1.ICreateChildRolloutJob|null|undefined} createChildRolloutJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.createChildRolloutJob = null; + + /** + * Job advanceChildRolloutJob. + * @member {google.cloud.deploy.v1.IAdvanceChildRolloutJob|null|undefined} advanceChildRolloutJob + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Job.prototype.advanceChildRolloutJob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Job jobType. + * @member {"deployJob"|"verifyJob"|"predeployJob"|"postdeployJob"|"createChildRolloutJob"|"advanceChildRolloutJob"|undefined} jobType + * @memberof google.cloud.deploy.v1.Job + * @instance + */ + Object.defineProperty(Job.prototype, "jobType", { + get: $util.oneOfGetter($oneOfFields = ["deployJob", "verifyJob", "predeployJob", "postdeployJob", "createChildRolloutJob", "advanceChildRolloutJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Job instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Job} Job instance + */ + Job.create = function create(properties) { + return new Job(properties); + }; + + /** + * Encodes the specified Job message. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.jobRun != null && Object.hasOwnProperty.call(message, "jobRun")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobRun); + if (message.deployJob != null && Object.hasOwnProperty.call(message, "deployJob")) + $root.google.cloud.deploy.v1.DeployJob.encode(message.deployJob, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.verifyJob != null && Object.hasOwnProperty.call(message, "verifyJob")) + $root.google.cloud.deploy.v1.VerifyJob.encode(message.verifyJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createChildRolloutJob != null && Object.hasOwnProperty.call(message, "createChildRolloutJob")) + $root.google.cloud.deploy.v1.CreateChildRolloutJob.encode(message.createChildRolloutJob, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.advanceChildRolloutJob != null && Object.hasOwnProperty.call(message, "advanceChildRolloutJob")) + $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.encode(message.advanceChildRolloutJob, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.skipMessage != null && Object.hasOwnProperty.call(message, "skipMessage")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.skipMessage); + if (message.predeployJob != null && Object.hasOwnProperty.call(message, "predeployJob")) + $root.google.cloud.deploy.v1.PredeployJob.encode(message.predeployJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.postdeployJob != null && Object.hasOwnProperty.call(message, "postdeployJob")) + $root.google.cloud.deploy.v1.PostdeployJob.encode(message.postdeployJob, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.IJob} message Job message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Job.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Job message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Job(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 8: { + message.skipMessage = reader.string(); + break; + } + case 3: { + message.jobRun = reader.string(); + break; + } + case 4: { + message.deployJob = $root.google.cloud.deploy.v1.DeployJob.decode(reader, reader.uint32()); + break; + } + case 5: { + message.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.decode(reader, reader.uint32()); + break; + } + case 9: { + message.predeployJob = $root.google.cloud.deploy.v1.PredeployJob.decode(reader, reader.uint32()); + break; + } + case 10: { + message.postdeployJob = $root.google.cloud.deploy.v1.PostdeployJob.decode(reader, reader.uint32()); + break; + } + case 6: { + message.createChildRolloutJob = $root.google.cloud.deploy.v1.CreateChildRolloutJob.decode(reader, reader.uint32()); + break; + } + case 7: { + message.advanceChildRolloutJob = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Job message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.Job} Job + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Job.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Job message. + * @function verify + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Job.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) + if (!$util.isString(message.skipMessage)) + return "skipMessage: string expected"; + if (message.jobRun != null && message.hasOwnProperty("jobRun")) + if (!$util.isString(message.jobRun)) + return "jobRun: string expected"; + if (message.deployJob != null && message.hasOwnProperty("deployJob")) { + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.DeployJob.verify(message.deployJob); + if (error) + return "deployJob." + error; + } + } + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { + if (properties.jobType === 1) + return "jobType: multiple values"; + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.VerifyJob.verify(message.verifyJob); + if (error) + return "verifyJob." + error; + } + } + if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) { + if (properties.jobType === 1) + return "jobType: multiple values"; + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.PredeployJob.verify(message.predeployJob); + if (error) + return "predeployJob." + error; + } + } + if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) { + if (properties.jobType === 1) + return "jobType: multiple values"; + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.PostdeployJob.verify(message.postdeployJob); + if (error) + return "postdeployJob." + error; + } + } + if (message.createChildRolloutJob != null && message.hasOwnProperty("createChildRolloutJob")) { + if (properties.jobType === 1) + return "jobType: multiple values"; + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.CreateChildRolloutJob.verify(message.createChildRolloutJob); + if (error) + return "createChildRolloutJob." + error; + } + } + if (message.advanceChildRolloutJob != null && message.hasOwnProperty("advanceChildRolloutJob")) { + if (properties.jobType === 1) + return "jobType: multiple values"; + properties.jobType = 1; + { + var error = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.verify(message.advanceChildRolloutJob); + if (error) + return "advanceChildRolloutJob." + error; + } + } + return null; + }; + + /** + * Creates a Job message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.Job} Job + */ + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Job) + return object; + var message = new $root.google.cloud.deploy.v1.Job(); + if (object.id != null) + message.id = String(object.id); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + case "IN_PROGRESS": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + case "SKIPPED": + case 7: + message.state = 7; + break; + case "IGNORED": + case 8: + message.state = 8; + break; + } + if (object.skipMessage != null) + message.skipMessage = String(object.skipMessage); + if (object.jobRun != null) + message.jobRun = String(object.jobRun); + if (object.deployJob != null) { + if (typeof object.deployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.deployJob: object expected"); + message.deployJob = $root.google.cloud.deploy.v1.DeployJob.fromObject(object.deployJob); + } + if (object.verifyJob != null) { + if (typeof object.verifyJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.verifyJob: object expected"); + message.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.fromObject(object.verifyJob); + } + if (object.predeployJob != null) { + if (typeof object.predeployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.predeployJob: object expected"); + message.predeployJob = $root.google.cloud.deploy.v1.PredeployJob.fromObject(object.predeployJob); + } + if (object.postdeployJob != null) { + if (typeof object.postdeployJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.postdeployJob: object expected"); + message.postdeployJob = $root.google.cloud.deploy.v1.PostdeployJob.fromObject(object.postdeployJob); + } + if (object.createChildRolloutJob != null) { + if (typeof object.createChildRolloutJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.createChildRolloutJob: object expected"); + message.createChildRolloutJob = $root.google.cloud.deploy.v1.CreateChildRolloutJob.fromObject(object.createChildRolloutJob); + } + if (object.advanceChildRolloutJob != null) { + if (typeof object.advanceChildRolloutJob !== "object") + throw TypeError(".google.cloud.deploy.v1.Job.advanceChildRolloutJob: object expected"); + message.advanceChildRolloutJob = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.fromObject(object.advanceChildRolloutJob); + } + return message; + }; + + /** + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {google.cloud.deploy.v1.Job} message Job + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Job.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.jobRun = ""; + object.skipMessage = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.Job.State[message.state] : message.state; + if (message.jobRun != null && message.hasOwnProperty("jobRun")) + object.jobRun = message.jobRun; + if (message.deployJob != null && message.hasOwnProperty("deployJob")) { + object.deployJob = $root.google.cloud.deploy.v1.DeployJob.toObject(message.deployJob, options); + if (options.oneofs) + object.jobType = "deployJob"; + } + if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { + object.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.toObject(message.verifyJob, options); + if (options.oneofs) + object.jobType = "verifyJob"; + } + if (message.createChildRolloutJob != null && message.hasOwnProperty("createChildRolloutJob")) { + object.createChildRolloutJob = $root.google.cloud.deploy.v1.CreateChildRolloutJob.toObject(message.createChildRolloutJob, options); + if (options.oneofs) + object.jobType = "createChildRolloutJob"; + } + if (message.advanceChildRolloutJob != null && message.hasOwnProperty("advanceChildRolloutJob")) { + object.advanceChildRolloutJob = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.toObject(message.advanceChildRolloutJob, options); + if (options.oneofs) + object.jobType = "advanceChildRolloutJob"; + } + if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) + object.skipMessage = message.skipMessage; + if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) { + object.predeployJob = $root.google.cloud.deploy.v1.PredeployJob.toObject(message.predeployJob, options); + if (options.oneofs) + object.jobType = "predeployJob"; + } + if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) { + object.postdeployJob = $root.google.cloud.deploy.v1.PostdeployJob.toObject(message.postdeployJob, options); + if (options.oneofs) + object.jobType = "postdeployJob"; + } + return object; + }; + + /** + * Converts this Job to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.Job + * @instance + * @returns {Object.} JSON object + */ + Job.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Job + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.Job + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.Job"; + }; + + /** + * State enum. + * @name google.cloud.deploy.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} DISABLED=2 DISABLED value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + * @property {number} SKIPPED=7 SKIPPED value + * @property {number} IGNORED=8 IGNORED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + values[valuesById[7] = "SKIPPED"] = 7; + values[valuesById[8] = "IGNORED"] = 8; + return values; + })(); + + return Job; + })(); + + v1.DeployJob = (function() { + + /** + * Properties of a DeployJob. + * @memberof google.cloud.deploy.v1 + * @interface IDeployJob + */ + + /** + * Constructs a new DeployJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployJob. + * @implements IDeployJob + * @constructor + * @param {google.cloud.deploy.v1.IDeployJob=} [properties] Properties to set + */ + function DeployJob(properties) { + if (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 DeployJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.IDeployJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob instance + */ + DeployJob.create = function create(properties) { + return new DeployJob(properties); + }; + + /** + * Encodes the specified DeployJob message. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.IDeployJob} message DeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.IDeployJob} message DeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployJob message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeployJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + */ + DeployJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployJob) + return object; + return new $root.google.cloud.deploy.v1.DeployJob(); + }; + + /** + * Creates a plain object from a DeployJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {google.cloud.deploy.v1.DeployJob} message DeployJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployJob.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeployJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployJob + * @instance + * @returns {Object.} JSON object + */ + DeployJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJob"; + }; + + return DeployJob; + })(); + + v1.VerifyJob = (function() { + + /** + * Properties of a VerifyJob. + * @memberof google.cloud.deploy.v1 + * @interface IVerifyJob + */ + + /** + * Constructs a new VerifyJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a VerifyJob. + * @implements IVerifyJob + * @constructor + * @param {google.cloud.deploy.v1.IVerifyJob=} [properties] Properties to set + */ + function VerifyJob(properties) { + if (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 VerifyJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {google.cloud.deploy.v1.IVerifyJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob instance + */ + VerifyJob.create = function create(properties) { + return new VerifyJob(properties); + }; + + /** + * Encodes the specified VerifyJob message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {google.cloud.deploy.v1.IVerifyJob} message VerifyJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VerifyJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {google.cloud.deploy.v1.IVerifyJob} message VerifyJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.VerifyJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyJob message. + * @function verify + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VerifyJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob + */ + VerifyJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.VerifyJob) + return object; + return new $root.google.cloud.deploy.v1.VerifyJob(); + }; + + /** + * Creates a plain object from a VerifyJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {google.cloud.deploy.v1.VerifyJob} message VerifyJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyJob.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VerifyJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.VerifyJob + * @instance + * @returns {Object.} JSON object + */ + VerifyJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.VerifyJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.VerifyJob"; + }; + + return VerifyJob; + })(); + + v1.PredeployJob = (function() { + + /** + * Properties of a PredeployJob. + * @memberof google.cloud.deploy.v1 + * @interface IPredeployJob + * @property {Array.|null} [actions] PredeployJob actions + */ + + /** + * Constructs a new PredeployJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a PredeployJob. + * @implements IPredeployJob + * @constructor + * @param {google.cloud.deploy.v1.IPredeployJob=} [properties] Properties to set + */ + function PredeployJob(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PredeployJob actions. + * @member {Array.} actions + * @memberof google.cloud.deploy.v1.PredeployJob + * @instance + */ + PredeployJob.prototype.actions = $util.emptyArray; + + /** + * Creates a new PredeployJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {google.cloud.deploy.v1.IPredeployJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob instance + */ + PredeployJob.create = function create(properties) { + return new PredeployJob(properties); + }; + + /** + * Encodes the specified PredeployJob message. Does not implicitly {@link google.cloud.deploy.v1.PredeployJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {google.cloud.deploy.v1.IPredeployJob} message PredeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PredeployJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actions[i]); + return writer; + }; + + /** + * Encodes the specified PredeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PredeployJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {google.cloud.deploy.v1.IPredeployJob} message PredeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PredeployJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PredeployJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PredeployJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PredeployJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PredeployJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PredeployJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PredeployJob message. + * @function verify + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PredeployJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) + if (!$util.isString(message.actions[i])) + return "actions: string[] expected"; + } + return null; + }; + + /** + * Creates a PredeployJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob + */ + PredeployJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PredeployJob) + return object; + var message = new $root.google.cloud.deploy.v1.PredeployJob(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.deploy.v1.PredeployJob.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) + message.actions[i] = String(object.actions[i]); + } + return message; + }; + + /** + * Creates a plain object from a PredeployJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {google.cloud.deploy.v1.PredeployJob} message PredeployJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PredeployJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = message.actions[j]; + } + return object; + }; + + /** + * Converts this PredeployJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.PredeployJob + * @instance + * @returns {Object.} JSON object + */ + PredeployJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PredeployJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.PredeployJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PredeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.PredeployJob"; + }; + + return PredeployJob; + })(); + + v1.PostdeployJob = (function() { + + /** + * Properties of a PostdeployJob. + * @memberof google.cloud.deploy.v1 + * @interface IPostdeployJob + * @property {Array.|null} [actions] PostdeployJob actions + */ + + /** + * Constructs a new PostdeployJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a PostdeployJob. + * @implements IPostdeployJob + * @constructor + * @param {google.cloud.deploy.v1.IPostdeployJob=} [properties] Properties to set + */ + function PostdeployJob(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PostdeployJob actions. + * @member {Array.} actions + * @memberof google.cloud.deploy.v1.PostdeployJob + * @instance + */ + PostdeployJob.prototype.actions = $util.emptyArray; + + /** + * Creates a new PostdeployJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {google.cloud.deploy.v1.IPostdeployJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob instance + */ + PostdeployJob.create = function create(properties) { + return new PostdeployJob(properties); + }; + + /** + * Encodes the specified PostdeployJob message. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {google.cloud.deploy.v1.IPostdeployJob} message PostdeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostdeployJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.actions[i]); + return writer; + }; + + /** + * Encodes the specified PostdeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {google.cloud.deploy.v1.IPostdeployJob} message PostdeployJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostdeployJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostdeployJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostdeployJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PostdeployJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostdeployJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostdeployJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostdeployJob message. + * @function verify + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostdeployJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) + if (!$util.isString(message.actions[i])) + return "actions: string[] expected"; + } + return null; + }; + + /** + * Creates a PostdeployJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob + */ + PostdeployJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PostdeployJob) + return object; + var message = new $root.google.cloud.deploy.v1.PostdeployJob(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.deploy.v1.PostdeployJob.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) + message.actions[i] = String(object.actions[i]); + } + return message; + }; + + /** + * Creates a plain object from a PostdeployJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {google.cloud.deploy.v1.PostdeployJob} message PostdeployJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostdeployJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = message.actions[j]; + } + return object; + }; + + /** + * Converts this PostdeployJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.PostdeployJob + * @instance + * @returns {Object.} JSON object + */ + PostdeployJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostdeployJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.PostdeployJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostdeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.PostdeployJob"; + }; + + return PostdeployJob; + })(); + + v1.CreateChildRolloutJob = (function() { + + /** + * Properties of a CreateChildRolloutJob. + * @memberof google.cloud.deploy.v1 + * @interface ICreateChildRolloutJob + */ + + /** + * Constructs a new CreateChildRolloutJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a CreateChildRolloutJob. + * @implements ICreateChildRolloutJob + * @constructor + * @param {google.cloud.deploy.v1.ICreateChildRolloutJob=} [properties] Properties to set + */ + function CreateChildRolloutJob(properties) { + if (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 CreateChildRolloutJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.ICreateChildRolloutJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob instance + */ + CreateChildRolloutJob.create = function create(properties) { + return new CreateChildRolloutJob(properties); + }; + + /** + * Encodes the specified CreateChildRolloutJob message. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.ICreateChildRolloutJob} message CreateChildRolloutJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChildRolloutJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CreateChildRolloutJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.ICreateChildRolloutJob} message CreateChildRolloutJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChildRolloutJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateChildRolloutJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChildRolloutJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateChildRolloutJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateChildRolloutJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChildRolloutJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateChildRolloutJob message. + * @function verify + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateChildRolloutJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CreateChildRolloutJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob + */ + CreateChildRolloutJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateChildRolloutJob) + return object; + return new $root.google.cloud.deploy.v1.CreateChildRolloutJob(); + }; + + /** + * Creates a plain object from a CreateChildRolloutJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.CreateChildRolloutJob} message CreateChildRolloutJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateChildRolloutJob.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreateChildRolloutJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @instance + * @returns {Object.} JSON object + */ + CreateChildRolloutJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateChildRolloutJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateChildRolloutJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateChildRolloutJob"; + }; + + return CreateChildRolloutJob; + })(); + + v1.AdvanceChildRolloutJob = (function() { + + /** + * Properties of an AdvanceChildRolloutJob. + * @memberof google.cloud.deploy.v1 + * @interface IAdvanceChildRolloutJob + */ + + /** + * Constructs a new AdvanceChildRolloutJob. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AdvanceChildRolloutJob. + * @implements IAdvanceChildRolloutJob + * @constructor + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob=} [properties] Properties to set + */ + function AdvanceChildRolloutJob(properties) { + if (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 AdvanceChildRolloutJob instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob instance + */ + AdvanceChildRolloutJob.create = function create(properties) { + return new AdvanceChildRolloutJob(properties); + }; + + /** + * Encodes the specified AdvanceChildRolloutJob message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob} message AdvanceChildRolloutJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvanceChildRolloutJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AdvanceChildRolloutJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob} message AdvanceChildRolloutJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvanceChildRolloutJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvanceChildRolloutJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvanceChildRolloutJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceChildRolloutJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvanceChildRolloutJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvanceChildRolloutJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvanceChildRolloutJob message. + * @function verify + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvanceChildRolloutJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AdvanceChildRolloutJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob + */ + AdvanceChildRolloutJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AdvanceChildRolloutJob) + return object; + return new $root.google.cloud.deploy.v1.AdvanceChildRolloutJob(); + }; + + /** + * Creates a plain object from an AdvanceChildRolloutJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {google.cloud.deploy.v1.AdvanceChildRolloutJob} message AdvanceChildRolloutJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvanceChildRolloutJob.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AdvanceChildRolloutJob to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @instance + * @returns {Object.} JSON object + */ + AdvanceChildRolloutJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvanceChildRolloutJob + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvanceChildRolloutJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceChildRolloutJob"; + }; + + return AdvanceChildRolloutJob; + })(); + + v1.ListRolloutsRequest = (function() { + + /** + * Properties of a ListRolloutsRequest. + * @memberof google.cloud.deploy.v1 + * @interface IListRolloutsRequest + * @property {string|null} [parent] ListRolloutsRequest parent + * @property {number|null} [pageSize] ListRolloutsRequest pageSize + * @property {string|null} [pageToken] ListRolloutsRequest pageToken + * @property {string|null} [filter] ListRolloutsRequest filter + * @property {string|null} [orderBy] ListRolloutsRequest orderBy + */ + + /** + * Constructs a new ListRolloutsRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListRolloutsRequest. + * @implements IListRolloutsRequest + * @constructor + * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + */ + function ListRolloutsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRolloutsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.parent = ""; + + /** + * ListRolloutsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.pageSize = 0; + + /** + * ListRolloutsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.pageToken = ""; + + /** + * ListRolloutsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.filter = ""; + + /** + * ListRolloutsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + */ + ListRolloutsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListRolloutsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest instance + */ + ListRolloutsRequest.create = function create(properties) { + return new ListRolloutsRequest(properties); + }; + + /** + * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListRolloutsRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRolloutsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + */ + ListRolloutsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsRequest) + return object; + var message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {google.cloud.deploy.v1.ListRolloutsRequest} message ListRolloutsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRolloutsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListRolloutsRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @instance + * @returns {Object.} JSON object + */ + ListRolloutsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListRolloutsRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRolloutsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsRequest"; + }; + + return ListRolloutsRequest; + })(); + + v1.ListRolloutsResponse = (function() { + + /** + * Properties of a ListRolloutsResponse. + * @memberof google.cloud.deploy.v1 + * @interface IListRolloutsResponse + * @property {Array.|null} [rollouts] ListRolloutsResponse rollouts + * @property {string|null} [nextPageToken] ListRolloutsResponse nextPageToken + * @property {Array.|null} [unreachable] ListRolloutsResponse unreachable + */ + + /** + * Constructs a new ListRolloutsResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a ListRolloutsResponse. + * @implements IListRolloutsResponse + * @constructor + * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + */ + function ListRolloutsResponse(properties) { + this.rollouts = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListRolloutsResponse rollouts. + * @member {Array.} rollouts + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + */ + ListRolloutsResponse.prototype.rollouts = $util.emptyArray; + + /** + * ListRolloutsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + */ + ListRolloutsResponse.prototype.nextPageToken = ""; + + /** + * ListRolloutsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + */ + ListRolloutsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListRolloutsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse instance + */ + ListRolloutsResponse.create = function create(properties) { + return new ListRolloutsResponse(properties); + }; + + /** + * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rollouts != null && message.rollouts.length) + for (var i = 0; i < message.rollouts.length; ++i) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollouts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRolloutsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rollouts && message.rollouts.length)) + message.rollouts = []; + message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); break; } - if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.maintenanceModeTime); - if (error) - return "maintenanceModeTime." + error; - } - if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.supportExpirationTime); - if (error) - return "supportExpirationTime." + error; - } - return null; - }; - - /** - * Creates a SkaffoldSupportedCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} SkaffoldSupportedCondition - */ - SkaffoldSupportedCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition) - return object; - var message = new $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition(); - if (object.status != null) - message.status = Boolean(object.status); - switch (object.skaffoldSupportState) { - default: - if (typeof object.skaffoldSupportState === "number") { - message.skaffoldSupportState = object.skaffoldSupportState; + case 2: { + message.nextPageToken = reader.string(); break; } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; - case "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED": - case 0: - message.skaffoldSupportState = 0; - break; - case "SKAFFOLD_SUPPORT_STATE_SUPPORTED": - case 1: - message.skaffoldSupportState = 1; - break; - case "SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE": - case 2: - message.skaffoldSupportState = 2; - break; - case "SKAFFOLD_SUPPORT_STATE_UNSUPPORTED": - case 3: - message.skaffoldSupportState = 3; - break; - } - if (object.maintenanceModeTime != null) { - if (typeof object.maintenanceModeTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.maintenanceModeTime: object expected"); - message.maintenanceModeTime = $root.google.protobuf.Timestamp.fromObject(object.maintenanceModeTime); - } - if (object.supportExpirationTime != null) { - if (typeof object.supportExpirationTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.supportExpirationTime: object expected"); - message.supportExpirationTime = $root.google.protobuf.Timestamp.fromObject(object.supportExpirationTime); - } - return message; - }; - - /** - * Creates a plain object from a SkaffoldSupportedCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {google.cloud.deploy.v1.Release.SkaffoldSupportedCondition} message SkaffoldSupportedCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SkaffoldSupportedCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.status = false; - object.skaffoldSupportState = options.enums === String ? "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED" : 0; - object.maintenanceModeTime = null; - object.supportExpirationTime = null; } - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.skaffoldSupportState != null && message.hasOwnProperty("skaffoldSupportState")) - object.skaffoldSupportState = options.enums === String ? $root.google.cloud.deploy.v1.SkaffoldSupportState[message.skaffoldSupportState] === undefined ? message.skaffoldSupportState : $root.google.cloud.deploy.v1.SkaffoldSupportState[message.skaffoldSupportState] : message.skaffoldSupportState; - if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) - object.maintenanceModeTime = $root.google.protobuf.Timestamp.toObject(message.maintenanceModeTime, options); - if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) - object.supportExpirationTime = $root.google.protobuf.Timestamp.toObject(message.supportExpirationTime, options); - return object; - }; + } + return message; + }; - /** - * Converts this SkaffoldSupportedCondition to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @instance - * @returns {Object.} JSON object - */ - SkaffoldSupportedCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRolloutsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for SkaffoldSupportedCondition - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release.SkaffoldSupportedCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SkaffoldSupportedCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies a ListRolloutsResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRolloutsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rollouts != null && message.hasOwnProperty("rollouts")) { + if (!Array.isArray(message.rollouts)) + return "rollouts: array expected"; + for (var i = 0; i < message.rollouts.length; ++i) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollouts[i]); + if (error) + return "rollouts." + error; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release.SkaffoldSupportedCondition"; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; - return SkaffoldSupportedCondition; - })(); + /** + * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + */ + ListRolloutsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + if (object.rollouts) { + if (!Array.isArray(object.rollouts)) + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: array expected"); + message.rollouts = []; + for (var i = 0; i < object.rollouts.length; ++i) { + if (typeof object.rollouts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: object expected"); + message.rollouts[i] = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollouts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; - Release.ReleaseCondition = (function() { + /** + * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {google.cloud.deploy.v1.ListRolloutsResponse} message ListRolloutsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRolloutsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rollouts = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.rollouts && message.rollouts.length) { + object.rollouts = []; + for (var j = 0; j < message.rollouts.length; ++j) + object.rollouts[j] = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollouts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; - /** - * Properties of a ReleaseCondition. - * @memberof google.cloud.deploy.v1.Release - * @interface IReleaseCondition - * @property {google.cloud.deploy.v1.Release.IReleaseReadyCondition|null} [releaseReadyCondition] ReleaseCondition releaseReadyCondition - * @property {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition|null} [skaffoldSupportedCondition] ReleaseCondition skaffoldSupportedCondition - */ + /** + * Converts this ListRolloutsResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @instance + * @returns {Object.} JSON object + */ + ListRolloutsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ReleaseCondition. - * @memberof google.cloud.deploy.v1.Release - * @classdesc Represents a ReleaseCondition. - * @implements IReleaseCondition - * @constructor - * @param {google.cloud.deploy.v1.Release.IReleaseCondition=} [properties] Properties to set - */ - function ReleaseCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ListRolloutsResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListRolloutsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsResponse"; + }; - /** - * ReleaseCondition releaseReadyCondition. - * @member {google.cloud.deploy.v1.Release.IReleaseReadyCondition|null|undefined} releaseReadyCondition - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @instance - */ - ReleaseCondition.prototype.releaseReadyCondition = null; + return ListRolloutsResponse; + })(); - /** - * ReleaseCondition skaffoldSupportedCondition. - * @member {google.cloud.deploy.v1.Release.ISkaffoldSupportedCondition|null|undefined} skaffoldSupportedCondition - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @instance - */ - ReleaseCondition.prototype.skaffoldSupportedCondition = null; + v1.GetRolloutRequest = (function() { - /** - * Creates a new ReleaseCondition instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {google.cloud.deploy.v1.Release.IReleaseCondition=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition instance - */ - ReleaseCondition.create = function create(properties) { - return new ReleaseCondition(properties); - }; + /** + * Properties of a GetRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @interface IGetRolloutRequest + * @property {string|null} [name] GetRolloutRequest name + */ - /** - * Encodes the specified ReleaseCondition message. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseCondition.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {google.cloud.deploy.v1.Release.IReleaseCondition} message ReleaseCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.releaseReadyCondition != null && Object.hasOwnProperty.call(message, "releaseReadyCondition")) - $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.encode(message.releaseReadyCondition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.skaffoldSupportedCondition != null && Object.hasOwnProperty.call(message, "skaffoldSupportedCondition")) - $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.encode(message.skaffoldSupportedCondition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new GetRolloutRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a GetRolloutRequest. + * @implements IGetRolloutRequest + * @constructor + * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + */ + function GetRolloutRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified ReleaseCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Release.ReleaseCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {google.cloud.deploy.v1.Release.IReleaseCondition} message ReleaseCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReleaseCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * GetRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @instance + */ + GetRolloutRequest.prototype.name = ""; - /** - * Decodes a ReleaseCondition message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Release.ReleaseCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.releaseReadyCondition = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.decode(reader, reader.uint32()); - break; - } - case 2: { - message.skaffoldSupportedCondition = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new GetRolloutRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest instance + */ + GetRolloutRequest.create = function create(properties) { + return new GetRolloutRequest(properties); + }; - /** - * Decodes a ReleaseCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReleaseCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRolloutRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; - /** - * Verifies a ReleaseCondition message. - * @function verify - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReleaseCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.releaseReadyCondition != null && message.hasOwnProperty("releaseReadyCondition")) { - var error = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.verify(message.releaseReadyCondition); - if (error) - return "releaseReadyCondition." + error; - } - if (message.skaffoldSupportedCondition != null && message.hasOwnProperty("skaffoldSupportedCondition")) { - var error = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.verify(message.skaffoldSupportedCondition); - if (error) - return "skaffoldSupportedCondition." + error; + /** + * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRolloutRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + 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 null; - }; + } + return message; + }; - /** - * Creates a ReleaseCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Release.ReleaseCondition} ReleaseCondition - */ - ReleaseCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Release.ReleaseCondition) - return object; - var message = new $root.google.cloud.deploy.v1.Release.ReleaseCondition(); - if (object.releaseReadyCondition != null) { - if (typeof object.releaseReadyCondition !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.ReleaseCondition.releaseReadyCondition: object expected"); - message.releaseReadyCondition = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.fromObject(object.releaseReadyCondition); - } - if (object.skaffoldSupportedCondition != null) { - if (typeof object.skaffoldSupportedCondition !== "object") - throw TypeError(".google.cloud.deploy.v1.Release.ReleaseCondition.skaffoldSupportedCondition: object expected"); - message.skaffoldSupportedCondition = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.fromObject(object.skaffoldSupportedCondition); - } - return message; - }; + /** + * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ReleaseCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {google.cloud.deploy.v1.Release.ReleaseCondition} message ReleaseCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReleaseCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.releaseReadyCondition = null; - object.skaffoldSupportedCondition = null; - } - if (message.releaseReadyCondition != null && message.hasOwnProperty("releaseReadyCondition")) - object.releaseReadyCondition = $root.google.cloud.deploy.v1.Release.ReleaseReadyCondition.toObject(message.releaseReadyCondition, options); - if (message.skaffoldSupportedCondition != null && message.hasOwnProperty("skaffoldSupportedCondition")) - object.skaffoldSupportedCondition = $root.google.cloud.deploy.v1.Release.SkaffoldSupportedCondition.toObject(message.skaffoldSupportedCondition, options); + /** + * Verifies a GetRolloutRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRolloutRequest.verify = function verify(message) { + if (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 GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + */ + GetRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetRolloutRequest) return object; - }; + var message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this ReleaseCondition to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @instance - * @returns {Object.} JSON object - */ - ReleaseCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {google.cloud.deploy.v1.GetRolloutRequest} message GetRolloutRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRolloutRequest.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; + }; - /** - * Gets the default type url for ReleaseCondition - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Release.ReleaseCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReleaseCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.Release.ReleaseCondition"; - }; + /** + * Converts this GetRolloutRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @instance + * @returns {Object.} JSON object + */ + GetRolloutRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ReleaseCondition; - })(); + /** + * Gets the default type url for GetRolloutRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.GetRolloutRequest"; + }; - return Release; + return GetRolloutRequest; })(); - v1.BuildArtifact = (function() { + v1.CreateRolloutRequest = (function() { /** - * Properties of a BuildArtifact. + * Properties of a CreateRolloutRequest. * @memberof google.cloud.deploy.v1 - * @interface IBuildArtifact - * @property {string|null} [image] BuildArtifact image - * @property {string|null} [tag] BuildArtifact tag + * @interface ICreateRolloutRequest + * @property {string|null} [parent] CreateRolloutRequest parent + * @property {string|null} [rolloutId] CreateRolloutRequest rolloutId + * @property {google.cloud.deploy.v1.IRollout|null} [rollout] CreateRolloutRequest rollout + * @property {string|null} [requestId] CreateRolloutRequest requestId + * @property {boolean|null} [validateOnly] CreateRolloutRequest validateOnly + * @property {string|null} [startingPhaseId] CreateRolloutRequest startingPhaseId */ /** - * Constructs a new BuildArtifact. + * Constructs a new CreateRolloutRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a BuildArtifact. - * @implements IBuildArtifact + * @classdesc Represents a CreateRolloutRequest. + * @implements ICreateRolloutRequest * @constructor - * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set */ - function BuildArtifact(properties) { + function CreateRolloutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14817,89 +25003,145 @@ } /** - * BuildArtifact image. - * @member {string} image - * @memberof google.cloud.deploy.v1.BuildArtifact + * CreateRolloutRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @instance */ - BuildArtifact.prototype.image = ""; + CreateRolloutRequest.prototype.parent = ""; /** - * BuildArtifact tag. - * @member {string} tag - * @memberof google.cloud.deploy.v1.BuildArtifact + * CreateRolloutRequest rolloutId. + * @member {string} rolloutId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @instance */ - BuildArtifact.prototype.tag = ""; + CreateRolloutRequest.prototype.rolloutId = ""; /** - * Creates a new BuildArtifact instance using the specified properties. + * CreateRolloutRequest rollout. + * @member {google.cloud.deploy.v1.IRollout|null|undefined} rollout + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.rollout = null; + + /** + * CreateRolloutRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.requestId = ""; + + /** + * CreateRolloutRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.validateOnly = false; + + /** + * CreateRolloutRequest startingPhaseId. + * @member {string} startingPhaseId + * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @instance + */ + CreateRolloutRequest.prototype.startingPhaseId = ""; + + /** + * Creates a new CreateRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.IBuildArtifact=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact instance + * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest instance */ - BuildArtifact.create = function create(properties) { - return new BuildArtifact(properties); + CreateRolloutRequest.create = function create(properties) { + return new CreateRolloutRequest(properties); }; /** - * Encodes the specified BuildArtifact message. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildArtifact.encode = function encode(message, writer) { + CreateRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tag); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.image); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + $root.google.cloud.deploy.v1.Rollout.encode(message.rollout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.startingPhaseId != null && Object.hasOwnProperty.call(message, "startingPhaseId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.startingPhaseId); return writer; }; /** - * Encodes the specified BuildArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.BuildArtifact.verify|verify} messages. + * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.IBuildArtifact} message BuildArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildArtifact.encodeDelimited = function encodeDelimited(message, writer) { + CreateRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildArtifact message from the specified reader or buffer. + * Decodes a CreateRolloutRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildArtifact.decode = function decode(reader, length) { + CreateRolloutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.BuildArtifact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.image = reader.string(); + case 1: { + message.parent = reader.string(); break; } case 2: { - message.tag = reader.string(); + message.rolloutId = reader.string(); + break; + } + case 3: { + message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 7: { + message.startingPhaseId = reader.string(); break; } default: @@ -14911,135 +25153,174 @@ }; /** - * Decodes a BuildArtifact message from the specified reader or buffer, length delimited. + * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildArtifact.decodeDelimited = function decodeDelimited(reader) { + CreateRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildArtifact message. + * Verifies a CreateRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildArtifact.verify = function verify(message) { + CreateRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.image != null && message.hasOwnProperty("image")) - if (!$util.isString(message.image)) - return "image: string expected"; - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) { + var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollout); + if (error) + return "rollout." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.startingPhaseId != null && message.hasOwnProperty("startingPhaseId")) + if (!$util.isString(message.startingPhaseId)) + return "startingPhaseId: string expected"; return null; }; /** - * Creates a BuildArtifact message from a plain object. Also converts values to their respective internal types. + * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.BuildArtifact} BuildArtifact + * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest */ - BuildArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.BuildArtifact) + CreateRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateRolloutRequest) return object; - var message = new $root.google.cloud.deploy.v1.BuildArtifact(); - if (object.image != null) - message.image = String(object.image); - if (object.tag != null) - message.tag = String(object.tag); + var message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + if (object.rollout != null) { + if (typeof object.rollout !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateRolloutRequest.rollout: object expected"); + message.rollout = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollout); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.startingPhaseId != null) + message.startingPhaseId = String(object.startingPhaseId); return message; }; /** - * Creates a plain object from a BuildArtifact message. Also converts values to other types if specified. + * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static - * @param {google.cloud.deploy.v1.BuildArtifact} message BuildArtifact + * @param {google.cloud.deploy.v1.CreateRolloutRequest} message CreateRolloutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildArtifact.toObject = function toObject(message, options) { + CreateRolloutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.tag = ""; - object.image = ""; + object.parent = ""; + object.rolloutId = ""; + object.rollout = null; + object.requestId = ""; + object.validateOnly = false; + object.startingPhaseId = ""; } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; - if (message.image != null && message.hasOwnProperty("image")) - object.image = message.image; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollout, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.startingPhaseId != null && message.hasOwnProperty("startingPhaseId")) + object.startingPhaseId = message.startingPhaseId; return object; }; /** - * Converts this BuildArtifact to JSON. + * Converts this CreateRolloutRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @instance * @returns {Object.} JSON object */ - BuildArtifact.prototype.toJSON = function toJSON() { + CreateRolloutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BuildArtifact + * Gets the default type url for CreateRolloutRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.BuildArtifact + * @memberof google.cloud.deploy.v1.CreateRolloutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BuildArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.BuildArtifact"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateRolloutRequest"; }; - return BuildArtifact; + return CreateRolloutRequest; })(); - v1.TargetArtifact = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a TargetArtifact. + * Properties of an OperationMetadata. * @memberof google.cloud.deploy.v1 - * @interface ITargetArtifact - * @property {string|null} [artifactUri] TargetArtifact artifactUri - * @property {string|null} [skaffoldConfigPath] TargetArtifact skaffoldConfigPath - * @property {string|null} [manifestPath] TargetArtifact manifestPath - * @property {Object.|null} [phaseArtifacts] TargetArtifact phaseArtifacts + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new TargetArtifact. + * Constructs a new OperationMetadata. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a TargetArtifact. - * @implements ITargetArtifact + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set */ - function TargetArtifact(properties) { - this.phaseArtifacts = {}; + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15047,153 +25328,159 @@ } /** - * TargetArtifact artifactUri. - * @member {string|null|undefined} artifactUri - * @memberof google.cloud.deploy.v1.TargetArtifact + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - TargetArtifact.prototype.artifactUri = null; + OperationMetadata.prototype.createTime = null; /** - * TargetArtifact skaffoldConfigPath. - * @member {string} skaffoldConfigPath - * @memberof google.cloud.deploy.v1.TargetArtifact + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - TargetArtifact.prototype.skaffoldConfigPath = ""; + OperationMetadata.prototype.endTime = null; /** - * TargetArtifact manifestPath. - * @member {string} manifestPath - * @memberof google.cloud.deploy.v1.TargetArtifact + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - TargetArtifact.prototype.manifestPath = ""; + OperationMetadata.prototype.statusMessage = ""; /** - * TargetArtifact phaseArtifacts. - * @member {Object.} phaseArtifacts - * @memberof google.cloud.deploy.v1.TargetArtifact + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - TargetArtifact.prototype.phaseArtifacts = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + OperationMetadata.prototype.requestedCancellation = false; /** - * TargetArtifact uri. - * @member {"artifactUri"|undefined} uri - * @memberof google.cloud.deploy.v1.TargetArtifact + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.deploy.v1.OperationMetadata * @instance */ - Object.defineProperty(TargetArtifact.prototype, "uri", { - get: $util.oneOfGetter($oneOfFields = ["artifactUri"]), - set: $util.oneOfSetter($oneOfFields) - }); + OperationMetadata.prototype.apiVersion = ""; /** - * Creates a new TargetArtifact instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.ITargetArtifact=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact instance + * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata instance */ - TargetArtifact.create = function create(properties) { - return new TargetArtifact(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified TargetArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetArtifact.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.skaffoldConfigPath); - if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); - if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); - if (message.phaseArtifacts != null && Object.hasOwnProperty.call(message, "phaseArtifacts")) - for (var keys = Object.keys(message.phaseArtifacts), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.encode(message.phaseArtifacts[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified TargetArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static - * @param {google.cloud.deploy.v1.ITargetArtifact} message TargetArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetArtifact.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetArtifact message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetArtifact.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.artifactUri = reader.string(); + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.skaffoldConfigPath = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.manifestPath = reader.string(); + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); break; } case 5: { - if (message.phaseArtifacts === $util.emptyObject) - message.phaseArtifacts = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.phaseArtifacts[key] = value; + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -15205,424 +25492,182 @@ }; /** - * Decodes a TargetArtifact message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetArtifact.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetArtifact message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetArtifact.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { - properties.uri = 1; - if (!$util.isString(message.artifactUri)) - return "artifactUri: 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.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - if (!$util.isString(message.skaffoldConfigPath)) - return "skaffoldConfigPath: string expected"; - if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) - if (!$util.isString(message.manifestPath)) - return "manifestPath: string expected"; - if (message.phaseArtifacts != null && message.hasOwnProperty("phaseArtifacts")) { - if (!$util.isObject(message.phaseArtifacts)) - return "phaseArtifacts: object expected"; - var key = Object.keys(message.phaseArtifacts); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.verify(message.phaseArtifacts[key[i]]); - if (error) - return "phaseArtifacts." + error; - } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a TargetArtifact message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.TargetArtifact + * @memberof google.cloud.deploy.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.TargetArtifact} TargetArtifact + * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata */ - TargetArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.OperationMetadata) return object; - var message = new $root.google.cloud.deploy.v1.TargetArtifact(); - if (object.artifactUri != null) - message.artifactUri = String(object.artifactUri); - if (object.skaffoldConfigPath != null) - message.skaffoldConfigPath = String(object.skaffoldConfigPath); - if (object.manifestPath != null) - message.manifestPath = String(object.manifestPath); - if (object.phaseArtifacts) { - if (typeof object.phaseArtifacts !== "object") - throw TypeError(".google.cloud.deploy.v1.TargetArtifact.phaseArtifacts: object expected"); - message.phaseArtifacts = {}; - for (var keys = Object.keys(object.phaseArtifacts), i = 0; i < keys.length; ++i) { - if (typeof object.phaseArtifacts[keys[i]] !== "object") - throw TypeError(".google.cloud.deploy.v1.TargetArtifact.phaseArtifacts: object expected"); - message.phaseArtifacts[keys[i]] = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.fromObject(object.phaseArtifacts[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a TargetArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.TargetArtifact - * @static - * @param {google.cloud.deploy.v1.TargetArtifact} message TargetArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.phaseArtifacts = {}; - if (options.defaults) { - object.skaffoldConfigPath = ""; - object.manifestPath = ""; - } - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - object.skaffoldConfigPath = message.skaffoldConfigPath; - if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) - object.manifestPath = message.manifestPath; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) { - object.artifactUri = message.artifactUri; - if (options.oneofs) - object.uri = "artifactUri"; - } - var keys2; - if (message.phaseArtifacts && (keys2 = Object.keys(message.phaseArtifacts)).length) { - object.phaseArtifacts = {}; - for (var j = 0; j < keys2.length; ++j) - object.phaseArtifacts[keys2[j]] = $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.toObject(message.phaseArtifacts[keys2[j]], options); - } - return object; - }; - - /** - * Converts this TargetArtifact to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.TargetArtifact - * @instance - * @returns {Object.} JSON object - */ - TargetArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetArtifact - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.TargetArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.cloud.deploy.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact"; - }; - - TargetArtifact.PhaseArtifact = (function() { - - /** - * Properties of a PhaseArtifact. - * @memberof google.cloud.deploy.v1.TargetArtifact - * @interface IPhaseArtifact - * @property {string|null} [skaffoldConfigPath] PhaseArtifact skaffoldConfigPath - * @property {string|null} [manifestPath] PhaseArtifact manifestPath - * @property {string|null} [jobManifestsPath] PhaseArtifact jobManifestsPath - */ - - /** - * Constructs a new PhaseArtifact. - * @memberof google.cloud.deploy.v1.TargetArtifact - * @classdesc Represents a PhaseArtifact. - * @implements IPhaseArtifact - * @constructor - * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact=} [properties] Properties to set - */ - function PhaseArtifact(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.deploy.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; - /** - * PhaseArtifact skaffoldConfigPath. - * @member {string} skaffoldConfigPath - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @instance - */ - PhaseArtifact.prototype.skaffoldConfigPath = ""; - - /** - * PhaseArtifact manifestPath. - * @member {string} manifestPath - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @instance - */ - PhaseArtifact.prototype.manifestPath = ""; - - /** - * PhaseArtifact jobManifestsPath. - * @member {string} jobManifestsPath - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @instance - */ - PhaseArtifact.prototype.jobManifestsPath = ""; - - /** - * Creates a new PhaseArtifact instance using the specified properties. - * @function create - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact instance - */ - PhaseArtifact.create = function create(properties) { - return new PhaseArtifact(properties); - }; - - /** - * Encodes the specified PhaseArtifact message. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.verify|verify} messages. - * @function encode - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact} message PhaseArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhaseArtifact.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.skaffoldConfigPath != null && Object.hasOwnProperty.call(message, "skaffoldConfigPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.skaffoldConfigPath); - if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); - if (message.jobManifestsPath != null && Object.hasOwnProperty.call(message, "jobManifestsPath")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobManifestsPath); - return writer; - }; - - /** - * Encodes the specified PhaseArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TargetArtifact.PhaseArtifact.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {google.cloud.deploy.v1.TargetArtifact.IPhaseArtifact} message PhaseArtifact message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhaseArtifact.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhaseArtifact message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhaseArtifact.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.skaffoldConfigPath = reader.string(); - break; - } - case 3: { - message.manifestPath = reader.string(); - break; - } - case 4: { - message.jobManifestsPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhaseArtifact message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhaseArtifact.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhaseArtifact message. - * @function verify - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhaseArtifact.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - if (!$util.isString(message.skaffoldConfigPath)) - return "skaffoldConfigPath: string expected"; - if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) - if (!$util.isString(message.manifestPath)) - return "manifestPath: string expected"; - if (message.jobManifestsPath != null && message.hasOwnProperty("jobManifestsPath")) - if (!$util.isString(message.jobManifestsPath)) - return "jobManifestsPath: string expected"; - return null; - }; - - /** - * Creates a PhaseArtifact message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} PhaseArtifact - */ - PhaseArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact) - return object; - var message = new $root.google.cloud.deploy.v1.TargetArtifact.PhaseArtifact(); - if (object.skaffoldConfigPath != null) - message.skaffoldConfigPath = String(object.skaffoldConfigPath); - if (object.manifestPath != null) - message.manifestPath = String(object.manifestPath); - if (object.jobManifestsPath != null) - message.jobManifestsPath = String(object.jobManifestsPath); - return message; - }; - - /** - * Creates a plain object from a PhaseArtifact message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {google.cloud.deploy.v1.TargetArtifact.PhaseArtifact} message PhaseArtifact - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhaseArtifact.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.skaffoldConfigPath = ""; - object.manifestPath = ""; - object.jobManifestsPath = ""; - } - if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) - object.skaffoldConfigPath = message.skaffoldConfigPath; - if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) - object.manifestPath = message.manifestPath; - if (message.jobManifestsPath != null && message.hasOwnProperty("jobManifestsPath")) - object.jobManifestsPath = message.jobManifestsPath; - return object; - }; - - /** - * Converts this PhaseArtifact to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @instance - * @returns {Object.} JSON object - */ - PhaseArtifact.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {google.cloud.deploy.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; - /** - * Gets the default type url for PhaseArtifact - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhaseArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.TargetArtifact.PhaseArtifact"; - }; + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PhaseArtifact; - })(); + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.OperationMetadata"; + }; - return TargetArtifact; + return OperationMetadata; })(); - v1.DeployArtifact = (function() { + v1.ApproveRolloutRequest = (function() { /** - * Properties of a DeployArtifact. + * Properties of an ApproveRolloutRequest. * @memberof google.cloud.deploy.v1 - * @interface IDeployArtifact - * @property {string|null} [artifactUri] DeployArtifact artifactUri - * @property {Array.|null} [manifestPaths] DeployArtifact manifestPaths + * @interface IApproveRolloutRequest + * @property {string|null} [name] ApproveRolloutRequest name + * @property {boolean|null} [approved] ApproveRolloutRequest approved */ /** - * Constructs a new DeployArtifact. + * Constructs a new ApproveRolloutRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeployArtifact. - * @implements IDeployArtifact + * @classdesc Represents an ApproveRolloutRequest. + * @implements IApproveRolloutRequest * @constructor - * @param {google.cloud.deploy.v1.IDeployArtifact=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set */ - function DeployArtifact(properties) { - this.manifestPaths = []; + function ApproveRolloutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15630,92 +25675,89 @@ } /** - * DeployArtifact artifactUri. - * @member {string} artifactUri - * @memberof google.cloud.deploy.v1.DeployArtifact + * ApproveRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @instance */ - DeployArtifact.prototype.artifactUri = ""; + ApproveRolloutRequest.prototype.name = ""; /** - * DeployArtifact manifestPaths. - * @member {Array.} manifestPaths - * @memberof google.cloud.deploy.v1.DeployArtifact + * ApproveRolloutRequest approved. + * @member {boolean} approved + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @instance */ - DeployArtifact.prototype.manifestPaths = $util.emptyArray; + ApproveRolloutRequest.prototype.approved = false; /** - * Creates a new DeployArtifact instance using the specified properties. + * Creates a new ApproveRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.IDeployArtifact=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact instance + * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest instance */ - DeployArtifact.create = function create(properties) { - return new DeployArtifact(properties); + ApproveRolloutRequest.create = function create(properties) { + return new ApproveRolloutRequest(properties); }; /** - * Encodes the specified DeployArtifact message. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.IDeployArtifact} message DeployArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployArtifact.encode = function encode(message, writer) { + ApproveRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifactUri); - if (message.manifestPaths != null && message.manifestPaths.length) - for (var i = 0; i < message.manifestPaths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.manifestPaths[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.approved != null && Object.hasOwnProperty.call(message, "approved")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.approved); return writer; }; /** - * Encodes the specified DeployArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.IDeployArtifact} message DeployArtifact message or plain object to encode + * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployArtifact.encodeDelimited = function encodeDelimited(message, writer) { + ApproveRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployArtifact message from the specified reader or buffer. + * Decodes an ApproveRolloutRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployArtifact.decode = function decode(reader, length) { + ApproveRolloutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployArtifact(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.artifactUri = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.manifestPaths && message.manifestPaths.length)) - message.manifestPaths = []; - message.manifestPaths.push(reader.string()); + message.approved = reader.bool(); break; } default: @@ -15727,143 +25769,130 @@ }; /** - * Decodes a DeployArtifact message from the specified reader or buffer, length delimited. + * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployArtifact.decodeDelimited = function decodeDelimited(reader) { + ApproveRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployArtifact message. + * Verifies an ApproveRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployArtifact.verify = function verify(message) { + ApproveRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) - if (!$util.isString(message.artifactUri)) - return "artifactUri: string expected"; - if (message.manifestPaths != null && message.hasOwnProperty("manifestPaths")) { - if (!Array.isArray(message.manifestPaths)) - return "manifestPaths: array expected"; - for (var i = 0; i < message.manifestPaths.length; ++i) - if (!$util.isString(message.manifestPaths[i])) - return "manifestPaths: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.approved != null && message.hasOwnProperty("approved")) + if (typeof message.approved !== "boolean") + return "approved: boolean expected"; return null; }; /** - * Creates a DeployArtifact message from a plain object. Also converts values to their respective internal types. + * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest */ - DeployArtifact.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeployArtifact) + ApproveRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutRequest) return object; - var message = new $root.google.cloud.deploy.v1.DeployArtifact(); - if (object.artifactUri != null) - message.artifactUri = String(object.artifactUri); - if (object.manifestPaths) { - if (!Array.isArray(object.manifestPaths)) - throw TypeError(".google.cloud.deploy.v1.DeployArtifact.manifestPaths: array expected"); - message.manifestPaths = []; - for (var i = 0; i < object.manifestPaths.length; ++i) - message.manifestPaths[i] = String(object.manifestPaths[i]); - } + var message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.approved != null) + message.approved = Boolean(object.approved); return message; }; /** - * Creates a plain object from a DeployArtifact message. Also converts values to other types if specified. + * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static - * @param {google.cloud.deploy.v1.DeployArtifact} message DeployArtifact + * @param {google.cloud.deploy.v1.ApproveRolloutRequest} message ApproveRolloutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployArtifact.toObject = function toObject(message, options) { + ApproveRolloutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.manifestPaths = []; - if (options.defaults) - object.artifactUri = ""; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) - object.artifactUri = message.artifactUri; - if (message.manifestPaths && message.manifestPaths.length) { - object.manifestPaths = []; - for (var j = 0; j < message.manifestPaths.length; ++j) - object.manifestPaths[j] = message.manifestPaths[j]; + if (options.defaults) { + object.name = ""; + object.approved = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.approved != null && message.hasOwnProperty("approved")) + object.approved = message.approved; return object; }; /** - * Converts this DeployArtifact to JSON. + * Converts this ApproveRolloutRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @instance * @returns {Object.} JSON object */ - DeployArtifact.prototype.toJSON = function toJSON() { + ApproveRolloutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployArtifact + * Gets the default type url for ApproveRolloutRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeployArtifact + * @memberof google.cloud.deploy.v1.ApproveRolloutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ApproveRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeployArtifact"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutRequest"; }; - return DeployArtifact; + return ApproveRolloutRequest; })(); - v1.CloudRunRenderMetadata = (function() { + v1.ApproveRolloutResponse = (function() { /** - * Properties of a CloudRunRenderMetadata. + * Properties of an ApproveRolloutResponse. * @memberof google.cloud.deploy.v1 - * @interface ICloudRunRenderMetadata - * @property {string|null} [service] CloudRunRenderMetadata service + * @interface IApproveRolloutResponse */ /** - * Constructs a new CloudRunRenderMetadata. + * Constructs a new ApproveRolloutResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CloudRunRenderMetadata. - * @implements ICloudRunRenderMetadata + * @classdesc Represents an ApproveRolloutResponse. + * @implements IApproveRolloutResponse * @constructor - * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set */ - function CloudRunRenderMetadata(properties) { + function ApproveRolloutResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15871,77 +25900,63 @@ } /** - * CloudRunRenderMetadata service. - * @member {string} service - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata - * @instance - */ - CloudRunRenderMetadata.prototype.service = ""; - - /** - * Creates a new CloudRunRenderMetadata instance using the specified properties. + * Creates a new ApproveRolloutResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static - * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata instance + * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse instance */ - CloudRunRenderMetadata.create = function create(properties) { - return new CloudRunRenderMetadata(properties); + ApproveRolloutResponse.create = function create(properties) { + return new ApproveRolloutResponse(properties); }; /** - * Encodes the specified CloudRunRenderMetadata message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunRenderMetadata.verify|verify} messages. + * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static - * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata} message CloudRunRenderMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRunRenderMetadata.encode = function encode(message, writer) { + ApproveRolloutResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); return writer; }; /** - * Encodes the specified CloudRunRenderMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunRenderMetadata.verify|verify} messages. + * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static - * @param {google.cloud.deploy.v1.ICloudRunRenderMetadata} message CloudRunRenderMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRunRenderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ApproveRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudRunRenderMetadata message from the specified reader or buffer. + * Decodes an ApproveRolloutResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRunRenderMetadata.decode = function decode(reader, length) { + ApproveRolloutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunRenderMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -15951,122 +25966,110 @@ }; /** - * Decodes a CloudRunRenderMetadata message from the specified reader or buffer, length delimited. + * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRunRenderMetadata.decodeDelimited = function decodeDelimited(reader) { + ApproveRolloutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudRunRenderMetadata message. + * Verifies an ApproveRolloutResponse message. * @function verify - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudRunRenderMetadata.verify = function verify(message) { + ApproveRolloutResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; return null; }; /** - * Creates a CloudRunRenderMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CloudRunRenderMetadata} CloudRunRenderMetadata + * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse */ - CloudRunRenderMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CloudRunRenderMetadata) + ApproveRolloutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutResponse) return object; - var message = new $root.google.cloud.deploy.v1.CloudRunRenderMetadata(); - if (object.service != null) - message.service = String(object.service); - return message; + return new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); }; /** - * Creates a plain object from a CloudRunRenderMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static - * @param {google.cloud.deploy.v1.CloudRunRenderMetadata} message CloudRunRenderMetadata + * @param {google.cloud.deploy.v1.ApproveRolloutResponse} message ApproveRolloutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudRunRenderMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - return object; + ApproveRolloutResponse.toObject = function toObject() { + return {}; }; /** - * Converts this CloudRunRenderMetadata to JSON. + * Converts this ApproveRolloutResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @instance * @returns {Object.} JSON object */ - CloudRunRenderMetadata.prototype.toJSON = function toJSON() { + ApproveRolloutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudRunRenderMetadata + * Gets the default type url for ApproveRolloutResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CloudRunRenderMetadata + * @memberof google.cloud.deploy.v1.ApproveRolloutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudRunRenderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ApproveRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunRenderMetadata"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutResponse"; }; - return CloudRunRenderMetadata; + return ApproveRolloutResponse; })(); - v1.RenderMetadata = (function() { + v1.AdvanceRolloutRequest = (function() { /** - * Properties of a RenderMetadata. + * Properties of an AdvanceRolloutRequest. * @memberof google.cloud.deploy.v1 - * @interface IRenderMetadata - * @property {google.cloud.deploy.v1.ICloudRunRenderMetadata|null} [cloudRun] RenderMetadata cloudRun + * @interface IAdvanceRolloutRequest + * @property {string|null} [name] AdvanceRolloutRequest name + * @property {string|null} [phaseId] AdvanceRolloutRequest phaseId */ /** - * Constructs a new RenderMetadata. + * Constructs a new AdvanceRolloutRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a RenderMetadata. - * @implements IRenderMetadata + * @classdesc Represents an AdvanceRolloutRequest. + * @implements IAdvanceRolloutRequest * @constructor - * @param {google.cloud.deploy.v1.IRenderMetadata=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest=} [properties] Properties to set */ - function RenderMetadata(properties) { + function AdvanceRolloutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16074,75 +26077,89 @@ } /** - * RenderMetadata cloudRun. - * @member {google.cloud.deploy.v1.ICloudRunRenderMetadata|null|undefined} cloudRun - * @memberof google.cloud.deploy.v1.RenderMetadata + * AdvanceRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @instance */ - RenderMetadata.prototype.cloudRun = null; + AdvanceRolloutRequest.prototype.name = ""; /** - * Creates a new RenderMetadata instance using the specified properties. + * AdvanceRolloutRequest phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @instance + */ + AdvanceRolloutRequest.prototype.phaseId = ""; + + /** + * Creates a new AdvanceRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static - * @param {google.cloud.deploy.v1.IRenderMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata instance + * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest instance */ - RenderMetadata.create = function create(properties) { - return new RenderMetadata(properties); + AdvanceRolloutRequest.create = function create(properties) { + return new AdvanceRolloutRequest(properties); }; /** - * Encodes the specified RenderMetadata message. Does not implicitly {@link google.cloud.deploy.v1.RenderMetadata.verify|verify} messages. + * Encodes the specified AdvanceRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static - * @param {google.cloud.deploy.v1.IRenderMetadata} message RenderMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} message AdvanceRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RenderMetadata.encode = function encode(message, writer) { + AdvanceRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) - $root.google.cloud.deploy.v1.CloudRunRenderMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); return writer; }; /** - * Encodes the specified RenderMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RenderMetadata.verify|verify} messages. + * Encodes the specified AdvanceRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static - * @param {google.cloud.deploy.v1.IRenderMetadata} message RenderMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} message AdvanceRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RenderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + AdvanceRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RenderMetadata message from the specified reader or buffer. + * Decodes an AdvanceRolloutRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata + * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RenderMetadata.decode = function decode(reader, length) { + AdvanceRolloutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RenderMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceRolloutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudRun = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.phaseId = reader.string(); break; } default: @@ -16154,131 +26171,130 @@ }; /** - * Decodes a RenderMetadata message from the specified reader or buffer, length delimited. + * Decodes an AdvanceRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata + * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RenderMetadata.decodeDelimited = function decodeDelimited(reader) { + AdvanceRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RenderMetadata message. + * Verifies an AdvanceRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RenderMetadata.verify = function verify(message) { + AdvanceRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { - var error = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.verify(message.cloudRun); - if (error) - return "cloudRun." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; return null; }; /** - * Creates a RenderMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AdvanceRolloutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.RenderMetadata} RenderMetadata + * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest */ - RenderMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.RenderMetadata) + AdvanceRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AdvanceRolloutRequest) return object; - var message = new $root.google.cloud.deploy.v1.RenderMetadata(); - if (object.cloudRun != null) { - if (typeof object.cloudRun !== "object") - throw TypeError(".google.cloud.deploy.v1.RenderMetadata.cloudRun: object expected"); - message.cloudRun = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.fromObject(object.cloudRun); - } + var message = new $root.google.cloud.deploy.v1.AdvanceRolloutRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.phaseId != null) + message.phaseId = String(object.phaseId); return message; }; /** - * Creates a plain object from a RenderMetadata message. Also converts values to other types if specified. + * Creates a plain object from an AdvanceRolloutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static - * @param {google.cloud.deploy.v1.RenderMetadata} message RenderMetadata + * @param {google.cloud.deploy.v1.AdvanceRolloutRequest} message AdvanceRolloutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RenderMetadata.toObject = function toObject(message, options) { + AdvanceRolloutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.cloudRun = null; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) - object.cloudRun = $root.google.cloud.deploy.v1.CloudRunRenderMetadata.toObject(message.cloudRun, options); + if (options.defaults) { + object.name = ""; + object.phaseId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; return object; }; /** - * Converts this RenderMetadata to JSON. + * Converts this AdvanceRolloutRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @instance * @returns {Object.} JSON object */ - RenderMetadata.prototype.toJSON = function toJSON() { + AdvanceRolloutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RenderMetadata + * Gets the default type url for AdvanceRolloutRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.RenderMetadata + * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RenderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvanceRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.RenderMetadata"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceRolloutRequest"; }; - return RenderMetadata; + return AdvanceRolloutRequest; })(); - v1.ListReleasesRequest = (function() { + v1.AdvanceRolloutResponse = (function() { /** - * Properties of a ListReleasesRequest. + * Properties of an AdvanceRolloutResponse. * @memberof google.cloud.deploy.v1 - * @interface IListReleasesRequest - * @property {string|null} [parent] ListReleasesRequest parent - * @property {number|null} [pageSize] ListReleasesRequest pageSize - * @property {string|null} [pageToken] ListReleasesRequest pageToken - * @property {string|null} [filter] ListReleasesRequest filter - * @property {string|null} [orderBy] ListReleasesRequest orderBy + * @interface IAdvanceRolloutResponse */ /** - * Constructs a new ListReleasesRequest. + * Constructs a new AdvanceRolloutResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListReleasesRequest. - * @implements IListReleasesRequest + * @classdesc Represents an AdvanceRolloutResponse. + * @implements IAdvanceRolloutResponse * @constructor - * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse=} [properties] Properties to set */ - function ListReleasesRequest(properties) { + function AdvanceRolloutResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16286,133 +26302,63 @@ } /** - * ListReleasesRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.parent = ""; - - /** - * ListReleasesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.pageSize = 0; - - /** - * ListReleasesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.pageToken = ""; - - /** - * ListReleasesRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.filter = ""; - - /** - * ListReleasesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListReleasesRequest - * @instance - */ - ListReleasesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListReleasesRequest instance using the specified properties. + * Creates a new AdvanceRolloutResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static - * @param {google.cloud.deploy.v1.IListReleasesRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest instance + * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse instance */ - ListReleasesRequest.create = function create(properties) { - return new ListReleasesRequest(properties); + AdvanceRolloutResponse.create = function create(properties) { + return new AdvanceRolloutResponse(properties); }; /** - * Encodes the specified ListReleasesRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * Encodes the specified AdvanceRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static - * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse} message AdvanceRolloutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesRequest.encode = function encode(message, writer) { + AdvanceRolloutResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified ListReleasesRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesRequest.verify|verify} messages. + * Encodes the specified AdvanceRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static - * @param {google.cloud.deploy.v1.IListReleasesRequest} message ListReleasesRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse} message AdvanceRolloutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesRequest.encodeDelimited = function encodeDelimited(message, writer) { + AdvanceRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReleasesRequest message from the specified reader or buffer. + * Decodes an AdvanceRolloutResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesRequest.decode = function decode(reader, length) { + AdvanceRolloutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceRolloutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -16422,159 +26368,109 @@ }; /** - * Decodes a ListReleasesRequest message from the specified reader or buffer, length delimited. + * Decodes an AdvanceRolloutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesRequest.decodeDelimited = function decodeDelimited(reader) { + AdvanceRolloutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReleasesRequest message. + * Verifies an AdvanceRolloutResponse message. * @function verify - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReleasesRequest.verify = function verify(message) { + AdvanceRolloutResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; return null; }; /** - * Creates a ListReleasesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AdvanceRolloutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListReleasesRequest} ListReleasesRequest + * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse */ - ListReleasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListReleasesRequest) + AdvanceRolloutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AdvanceRolloutResponse) return object; - var message = new $root.google.cloud.deploy.v1.ListReleasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; + return new $root.google.cloud.deploy.v1.AdvanceRolloutResponse(); }; /** - * Creates a plain object from a ListReleasesRequest message. Also converts values to other types if specified. + * Creates a plain object from an AdvanceRolloutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static - * @param {google.cloud.deploy.v1.ListReleasesRequest} message ListReleasesRequest + * @param {google.cloud.deploy.v1.AdvanceRolloutResponse} message AdvanceRolloutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReleasesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; + AdvanceRolloutResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ListReleasesRequest to JSON. + * Converts this AdvanceRolloutResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @instance * @returns {Object.} JSON object */ - ListReleasesRequest.prototype.toJSON = function toJSON() { + AdvanceRolloutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReleasesRequest + * Gets the default type url for AdvanceRolloutResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListReleasesRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReleasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvanceRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceRolloutResponse"; }; - return ListReleasesRequest; + return AdvanceRolloutResponse; })(); - v1.ListReleasesResponse = (function() { + v1.CancelRolloutRequest = (function() { /** - * Properties of a ListReleasesResponse. + * Properties of a CancelRolloutRequest. * @memberof google.cloud.deploy.v1 - * @interface IListReleasesResponse - * @property {Array.|null} [releases] ListReleasesResponse releases - * @property {string|null} [nextPageToken] ListReleasesResponse nextPageToken - * @property {Array.|null} [unreachable] ListReleasesResponse unreachable + * @interface ICancelRolloutRequest + * @property {string|null} [name] CancelRolloutRequest name */ /** - * Constructs a new ListReleasesResponse. + * Constructs a new CancelRolloutRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListReleasesResponse. - * @implements IListReleasesResponse + * @classdesc Represents a CancelRolloutRequest. + * @implements ICancelRolloutRequest * @constructor - * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICancelRolloutRequest=} [properties] Properties to set */ - function ListReleasesResponse(properties) { - this.releases = []; - this.unreachable = []; + function CancelRolloutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16582,109 +26478,75 @@ } /** - * ListReleasesResponse releases. - * @member {Array.} releases - * @memberof google.cloud.deploy.v1.ListReleasesResponse - * @instance - */ - ListReleasesResponse.prototype.releases = $util.emptyArray; - - /** - * ListReleasesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListReleasesResponse - * @instance - */ - ListReleasesResponse.prototype.nextPageToken = ""; - - /** - * ListReleasesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * CancelRolloutRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @instance */ - ListReleasesResponse.prototype.unreachable = $util.emptyArray; + CancelRolloutRequest.prototype.name = ""; /** - * Creates a new ListReleasesResponse instance using the specified properties. + * Creates a new CancelRolloutRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static - * @param {google.cloud.deploy.v1.IListReleasesResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse instance + * @param {google.cloud.deploy.v1.ICancelRolloutRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest instance */ - ListReleasesResponse.create = function create(properties) { - return new ListReleasesResponse(properties); + CancelRolloutRequest.create = function create(properties) { + return new CancelRolloutRequest(properties); }; /** - * Encodes the specified ListReleasesResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * Encodes the specified CancelRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static - * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelRolloutRequest} message CancelRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesResponse.encode = function encode(message, writer) { + CancelRolloutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.releases != null && message.releases.length) - for (var i = 0; i < message.releases.length; ++i) - $root.google.cloud.deploy.v1.Release.encode(message.releases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListReleasesResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListReleasesResponse.verify|verify} messages. + * Encodes the specified CancelRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static - * @param {google.cloud.deploy.v1.IListReleasesResponse} message ListReleasesResponse message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelRolloutRequest} message CancelRolloutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListReleasesResponse.encodeDelimited = function encodeDelimited(message, writer) { + CancelRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListReleasesResponse message from the specified reader or buffer. + * Decodes a CancelRolloutRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesResponse.decode = function decode(reader, length) { + CancelRolloutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CancelRolloutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.releases && message.releases.length)) - message.releases = []; - message.releases.push($root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.name = reader.string(); break; } default: @@ -16696,169 +26558,121 @@ }; /** - * Decodes a ListReleasesResponse message from the specified reader or buffer, length delimited. + * Decodes a CancelRolloutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListReleasesResponse.decodeDelimited = function decodeDelimited(reader) { + CancelRolloutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListReleasesResponse message. + * Verifies a CancelRolloutRequest message. * @function verify - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListReleasesResponse.verify = function verify(message) { + CancelRolloutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.releases != null && message.hasOwnProperty("releases")) { - if (!Array.isArray(message.releases)) - return "releases: array expected"; - for (var i = 0; i < message.releases.length; ++i) { - var error = $root.google.cloud.deploy.v1.Release.verify(message.releases[i]); - if (error) - return "releases." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListReleasesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CancelRolloutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListReleasesResponse} ListReleasesResponse + * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest */ - ListReleasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListReleasesResponse) + CancelRolloutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CancelRolloutRequest) return object; - var message = new $root.google.cloud.deploy.v1.ListReleasesResponse(); - if (object.releases) { - if (!Array.isArray(object.releases)) - throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: array expected"); - message.releases = []; - for (var i = 0; i < object.releases.length; ++i) { - if (typeof object.releases[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.releases: object expected"); - message.releases[i] = $root.google.cloud.deploy.v1.Release.fromObject(object.releases[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListReleasesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.deploy.v1.CancelRolloutRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListReleasesResponse message. Also converts values to other types if specified. + * Creates a plain object from a CancelRolloutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static - * @param {google.cloud.deploy.v1.ListReleasesResponse} message ListReleasesResponse + * @param {google.cloud.deploy.v1.CancelRolloutRequest} message CancelRolloutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListReleasesResponse.toObject = function toObject(message, options) { + CancelRolloutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.releases = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.releases && message.releases.length) { - object.releases = []; - for (var j = 0; j < message.releases.length; ++j) - object.releases[j] = $root.google.cloud.deploy.v1.Release.toObject(message.releases[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListReleasesResponse to JSON. + * Converts this CancelRolloutRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @instance * @returns {Object.} JSON object */ - ListReleasesResponse.prototype.toJSON = function toJSON() { + CancelRolloutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListReleasesResponse + * Gets the default type url for CancelRolloutRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListReleasesResponse + * @memberof google.cloud.deploy.v1.CancelRolloutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListReleasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListReleasesResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CancelRolloutRequest"; }; - return ListReleasesResponse; + return CancelRolloutRequest; })(); - v1.GetReleaseRequest = (function() { + v1.CancelRolloutResponse = (function() { /** - * Properties of a GetReleaseRequest. + * Properties of a CancelRolloutResponse. * @memberof google.cloud.deploy.v1 - * @interface IGetReleaseRequest - * @property {string|null} [name] GetReleaseRequest name + * @interface ICancelRolloutResponse */ /** - * Constructs a new GetReleaseRequest. + * Constructs a new CancelRolloutResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetReleaseRequest. - * @implements IGetReleaseRequest + * @classdesc Represents a CancelRolloutResponse. + * @implements ICancelRolloutResponse * @constructor - * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICancelRolloutResponse=} [properties] Properties to set */ - function GetReleaseRequest(properties) { + function CancelRolloutResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16866,77 +26680,63 @@ } /** - * GetReleaseRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetReleaseRequest - * @instance - */ - GetReleaseRequest.prototype.name = ""; - - /** - * Creates a new GetReleaseRequest instance using the specified properties. + * Creates a new CancelRolloutResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static - * @param {google.cloud.deploy.v1.IGetReleaseRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest instance + * @param {google.cloud.deploy.v1.ICancelRolloutResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse instance */ - GetReleaseRequest.create = function create(properties) { - return new GetReleaseRequest(properties); + CancelRolloutResponse.create = function create(properties) { + return new CancelRolloutResponse(properties); }; /** - * Encodes the specified GetReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * Encodes the specified CancelRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static - * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelRolloutResponse} message CancelRolloutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReleaseRequest.encode = function encode(message, writer) { + CancelRolloutResponse.encode = function encode(message, writer) { 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 GetReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetReleaseRequest.verify|verify} messages. + * Encodes the specified CancelRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static - * @param {google.cloud.deploy.v1.IGetReleaseRequest} message GetReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelRolloutResponse} message CancelRolloutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + CancelRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetReleaseRequest message from the specified reader or buffer. + * Decodes a CancelRolloutResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReleaseRequest.decode = function decode(reader, length) { + CancelRolloutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CancelRolloutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -16946,126 +26746,111 @@ }; /** - * Decodes a GetReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes a CancelRolloutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + CancelRolloutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetReleaseRequest message. + * Verifies a CancelRolloutResponse message. * @function verify - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetReleaseRequest.verify = function verify(message) { + CancelRolloutResponse.verify = function verify(message) { if (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 GetReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CancelRolloutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetReleaseRequest} GetReleaseRequest + * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse */ - GetReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetReleaseRequest) + CancelRolloutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CancelRolloutResponse) return object; - var message = new $root.google.cloud.deploy.v1.GetReleaseRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.cloud.deploy.v1.CancelRolloutResponse(); }; /** - * Creates a plain object from a GetReleaseRequest message. Also converts values to other types if specified. + * Creates a plain object from a CancelRolloutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static - * @param {google.cloud.deploy.v1.GetReleaseRequest} message GetReleaseRequest + * @param {google.cloud.deploy.v1.CancelRolloutResponse} message CancelRolloutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetReleaseRequest.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; + CancelRolloutResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetReleaseRequest to JSON. + * Converts this CancelRolloutResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @instance * @returns {Object.} JSON object */ - GetReleaseRequest.prototype.toJSON = function toJSON() { + CancelRolloutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetReleaseRequest + * Gets the default type url for CancelRolloutResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetReleaseRequest + * @memberof google.cloud.deploy.v1.CancelRolloutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetReleaseRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CancelRolloutResponse"; }; - return GetReleaseRequest; + return CancelRolloutResponse; })(); - v1.CreateReleaseRequest = (function() { + v1.IgnoreJobRequest = (function() { /** - * Properties of a CreateReleaseRequest. + * Properties of an IgnoreJobRequest. * @memberof google.cloud.deploy.v1 - * @interface ICreateReleaseRequest - * @property {string|null} [parent] CreateReleaseRequest parent - * @property {string|null} [releaseId] CreateReleaseRequest releaseId - * @property {google.cloud.deploy.v1.IRelease|null} [release] CreateReleaseRequest release - * @property {string|null} [requestId] CreateReleaseRequest requestId - * @property {boolean|null} [validateOnly] CreateReleaseRequest validateOnly + * @interface IIgnoreJobRequest + * @property {string|null} [rollout] IgnoreJobRequest rollout + * @property {string|null} [phaseId] IgnoreJobRequest phaseId + * @property {string|null} [jobId] IgnoreJobRequest jobId */ /** - * Constructs a new CreateReleaseRequest. + * Constructs a new IgnoreJobRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateReleaseRequest. - * @implements ICreateReleaseRequest + * @classdesc Represents an IgnoreJobRequest. + * @implements IIgnoreJobRequest * @constructor - * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IIgnoreJobRequest=} [properties] Properties to set */ - function CreateReleaseRequest(properties) { + function IgnoreJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17073,131 +26858,103 @@ } /** - * CreateReleaseRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateReleaseRequest - * @instance - */ - CreateReleaseRequest.prototype.parent = ""; - - /** - * CreateReleaseRequest releaseId. - * @member {string} releaseId - * @memberof google.cloud.deploy.v1.CreateReleaseRequest - * @instance - */ - CreateReleaseRequest.prototype.releaseId = ""; - - /** - * CreateReleaseRequest release. - * @member {google.cloud.deploy.v1.IRelease|null|undefined} release - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * IgnoreJobRequest rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @instance */ - CreateReleaseRequest.prototype.release = null; + IgnoreJobRequest.prototype.rollout = ""; /** - * CreateReleaseRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * IgnoreJobRequest phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @instance */ - CreateReleaseRequest.prototype.requestId = ""; + IgnoreJobRequest.prototype.phaseId = ""; /** - * CreateReleaseRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * IgnoreJobRequest jobId. + * @member {string} jobId + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @instance */ - CreateReleaseRequest.prototype.validateOnly = false; + IgnoreJobRequest.prototype.jobId = ""; /** - * Creates a new CreateReleaseRequest instance using the specified properties. + * Creates a new IgnoreJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static - * @param {google.cloud.deploy.v1.ICreateReleaseRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest instance + * @param {google.cloud.deploy.v1.IIgnoreJobRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest instance */ - CreateReleaseRequest.create = function create(properties) { - return new CreateReleaseRequest(properties); + IgnoreJobRequest.create = function create(properties) { + return new IgnoreJobRequest(properties); }; /** - * Encodes the specified CreateReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * Encodes the specified IgnoreJobRequest message. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static - * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IIgnoreJobRequest} message IgnoreJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReleaseRequest.encode = function encode(message, writer) { + IgnoreJobRequest.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.releaseId != null && Object.hasOwnProperty.call(message, "releaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.releaseId); - if (message.release != null && Object.hasOwnProperty.call(message, "release")) - $root.google.cloud.deploy.v1.Release.encode(message.release, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); return writer; }; /** - * Encodes the specified CreateReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateReleaseRequest.verify|verify} messages. + * Encodes the specified IgnoreJobRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static - * @param {google.cloud.deploy.v1.ICreateReleaseRequest} message CreateReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IIgnoreJobRequest} message IgnoreJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + IgnoreJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateReleaseRequest message from the specified reader or buffer. + * Decodes an IgnoreJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReleaseRequest.decode = function decode(reader, length) { + IgnoreJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.IgnoreJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.rollout = reader.string(); break; } case 2: { - message.releaseId = reader.string(); + message.phaseId = reader.string(); break; } case 3: { - message.release = $root.google.cloud.deploy.v1.Release.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); + message.jobId = reader.string(); break; } default: @@ -17209,182 +26966,138 @@ }; /** - * Decodes a CreateReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes an IgnoreJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + IgnoreJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateReleaseRequest message. + * Verifies an IgnoreJobRequest message. * @function verify - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateReleaseRequest.verify = function verify(message) { + IgnoreJobRequest.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.releaseId != null && message.hasOwnProperty("releaseId")) - if (!$util.isString(message.releaseId)) - return "releaseId: string expected"; - if (message.release != null && message.hasOwnProperty("release")) { - var error = $root.google.cloud.deploy.v1.Release.verify(message.release); - if (error) - return "release." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; return null; }; /** - * Creates a CreateReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates an IgnoreJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateReleaseRequest} CreateReleaseRequest + * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest */ - CreateReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateReleaseRequest) + IgnoreJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.IgnoreJobRequest) return object; - var message = new $root.google.cloud.deploy.v1.CreateReleaseRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.releaseId != null) - message.releaseId = String(object.releaseId); - if (object.release != null) { - if (typeof object.release !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateReleaseRequest.release: object expected"); - message.release = $root.google.cloud.deploy.v1.Release.fromObject(object.release); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.deploy.v1.IgnoreJobRequest(); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.phaseId != null) + message.phaseId = String(object.phaseId); + if (object.jobId != null) + message.jobId = String(object.jobId); return message; }; /** - * Creates a plain object from a CreateReleaseRequest message. Also converts values to other types if specified. + * Creates a plain object from an IgnoreJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static - * @param {google.cloud.deploy.v1.CreateReleaseRequest} message CreateReleaseRequest + * @param {google.cloud.deploy.v1.IgnoreJobRequest} message IgnoreJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateReleaseRequest.toObject = function toObject(message, options) { + IgnoreJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.releaseId = ""; - object.release = null; - object.requestId = ""; - object.validateOnly = false; + object.rollout = ""; + object.phaseId = ""; + object.jobId = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.releaseId != null && message.hasOwnProperty("releaseId")) - object.releaseId = message.releaseId; - if (message.release != null && message.hasOwnProperty("release")) - object.release = $root.google.cloud.deploy.v1.Release.toObject(message.release, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; return object; }; /** - * Converts this CreateReleaseRequest to JSON. + * Converts this IgnoreJobRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @instance * @returns {Object.} JSON object */ - CreateReleaseRequest.prototype.toJSON = function toJSON() { + IgnoreJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateReleaseRequest + * Gets the default type url for IgnoreJobRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateReleaseRequest + * @memberof google.cloud.deploy.v1.IgnoreJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IgnoreJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateReleaseRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.IgnoreJobRequest"; }; - return CreateReleaseRequest; + return IgnoreJobRequest; })(); - v1.Rollout = (function() { + v1.IgnoreJobResponse = (function() { /** - * Properties of a Rollout. + * Properties of an IgnoreJobResponse. * @memberof google.cloud.deploy.v1 - * @interface IRollout - * @property {string|null} [name] Rollout name - * @property {string|null} [uid] Rollout uid - * @property {string|null} [description] Rollout description - * @property {Object.|null} [annotations] Rollout annotations - * @property {Object.|null} [labels] Rollout labels - * @property {google.protobuf.ITimestamp|null} [createTime] Rollout createTime - * @property {google.protobuf.ITimestamp|null} [approveTime] Rollout approveTime - * @property {google.protobuf.ITimestamp|null} [enqueueTime] Rollout enqueueTime - * @property {google.protobuf.ITimestamp|null} [deployStartTime] Rollout deployStartTime - * @property {google.protobuf.ITimestamp|null} [deployEndTime] Rollout deployEndTime - * @property {string|null} [targetId] Rollout targetId - * @property {google.cloud.deploy.v1.Rollout.ApprovalState|null} [approvalState] Rollout approvalState - * @property {google.cloud.deploy.v1.Rollout.State|null} [state] Rollout state - * @property {string|null} [failureReason] Rollout failureReason - * @property {string|null} [deployingBuild] Rollout deployingBuild - * @property {string|null} [etag] Rollout etag - * @property {google.cloud.deploy.v1.Rollout.FailureCause|null} [deployFailureCause] Rollout deployFailureCause - * @property {Array.|null} [phases] Rollout phases - * @property {google.cloud.deploy.v1.IMetadata|null} [metadata] Rollout metadata - * @property {string|null} [controllerRollout] Rollout controllerRollout + * @interface IIgnoreJobResponse */ /** - * Constructs a new Rollout. + * Constructs a new IgnoreJobResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Rollout. - * @implements IRollout + * @classdesc Represents an IgnoreJobResponse. + * @implements IIgnoreJobResponse * @constructor - * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IIgnoreJobResponse=} [properties] Properties to set */ - function Rollout(properties) { - this.annotations = {}; - this.labels = {}; - this.phases = []; + function IgnoreJobResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17392,384 +27105,281 @@ } /** - * Rollout name. - * @member {string} name - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.name = ""; - - /** - * Rollout uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.uid = ""; - - /** - * Rollout description. - * @member {string} description - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.description = ""; - - /** - * Rollout annotations. - * @member {Object.} annotations - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.annotations = $util.emptyObject; - - /** - * Rollout labels. - * @member {Object.} labels - * @memberof google.cloud.deploy.v1.Rollout - * @instance - */ - Rollout.prototype.labels = $util.emptyObject; - - /** - * Rollout createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Creates a new IgnoreJobResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {google.cloud.deploy.v1.IIgnoreJobResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse instance */ - Rollout.prototype.createTime = null; + IgnoreJobResponse.create = function create(properties) { + return new IgnoreJobResponse(properties); + }; /** - * Rollout approveTime. - * @member {google.protobuf.ITimestamp|null|undefined} approveTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Encodes the specified IgnoreJobResponse message. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {google.cloud.deploy.v1.IIgnoreJobResponse} message IgnoreJobResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Rollout.prototype.approveTime = null; + IgnoreJobResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Rollout enqueueTime. - * @member {google.protobuf.ITimestamp|null|undefined} enqueueTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Encodes the specified IgnoreJobResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {google.cloud.deploy.v1.IIgnoreJobResponse} message IgnoreJobResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Rollout.prototype.enqueueTime = null; + IgnoreJobResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Rollout deployStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} deployStartTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Decodes an IgnoreJobResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rollout.prototype.deployStartTime = null; + IgnoreJobResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.IgnoreJobResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Rollout deployEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} deployEndTime - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Decodes an IgnoreJobResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rollout.prototype.deployEndTime = null; + IgnoreJobResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Rollout targetId. - * @member {string} targetId - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Verifies an IgnoreJobResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Rollout.prototype.targetId = ""; + IgnoreJobResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * Rollout approvalState. - * @member {google.cloud.deploy.v1.Rollout.ApprovalState} approvalState - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Creates an IgnoreJobResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse */ - Rollout.prototype.approvalState = 0; + IgnoreJobResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.IgnoreJobResponse) + return object; + return new $root.google.cloud.deploy.v1.IgnoreJobResponse(); + }; /** - * Rollout state. - * @member {google.cloud.deploy.v1.Rollout.State} state - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Creates a plain object from an IgnoreJobResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {google.cloud.deploy.v1.IgnoreJobResponse} message IgnoreJobResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Rollout.prototype.state = 0; + IgnoreJobResponse.toObject = function toObject() { + return {}; + }; /** - * Rollout failureReason. - * @member {string} failureReason - * @memberof google.cloud.deploy.v1.Rollout + * Converts this IgnoreJobResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.IgnoreJobResponse * @instance + * @returns {Object.} JSON object */ - Rollout.prototype.failureReason = ""; + IgnoreJobResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Rollout deployingBuild. - * @member {string} deployingBuild - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Gets the default type url for IgnoreJobResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Rollout.prototype.deployingBuild = ""; + IgnoreJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.IgnoreJobResponse"; + }; + + return IgnoreJobResponse; + })(); + + v1.RetryJobRequest = (function() { /** - * Rollout etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Properties of a RetryJobRequest. + * @memberof google.cloud.deploy.v1 + * @interface IRetryJobRequest + * @property {string|null} [rollout] RetryJobRequest rollout + * @property {string|null} [phaseId] RetryJobRequest phaseId + * @property {string|null} [jobId] RetryJobRequest jobId */ - Rollout.prototype.etag = ""; /** - * Rollout deployFailureCause. - * @member {google.cloud.deploy.v1.Rollout.FailureCause} deployFailureCause - * @memberof google.cloud.deploy.v1.Rollout - * @instance + * Constructs a new RetryJobRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RetryJobRequest. + * @implements IRetryJobRequest + * @constructor + * @param {google.cloud.deploy.v1.IRetryJobRequest=} [properties] Properties to set */ - Rollout.prototype.deployFailureCause = 0; + function RetryJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Rollout phases. - * @member {Array.} phases - * @memberof google.cloud.deploy.v1.Rollout + * RetryJobRequest rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest * @instance */ - Rollout.prototype.phases = $util.emptyArray; + RetryJobRequest.prototype.rollout = ""; /** - * Rollout metadata. - * @member {google.cloud.deploy.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.deploy.v1.Rollout + * RetryJobRequest phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.RetryJobRequest * @instance */ - Rollout.prototype.metadata = null; + RetryJobRequest.prototype.phaseId = ""; /** - * Rollout controllerRollout. - * @member {string} controllerRollout - * @memberof google.cloud.deploy.v1.Rollout + * RetryJobRequest jobId. + * @member {string} jobId + * @memberof google.cloud.deploy.v1.RetryJobRequest * @instance */ - Rollout.prototype.controllerRollout = ""; + RetryJobRequest.prototype.jobId = ""; /** - * Creates a new Rollout instance using the specified properties. + * Creates a new RetryJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest * @static - * @param {google.cloud.deploy.v1.IRollout=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Rollout} Rollout instance + * @param {google.cloud.deploy.v1.IRetryJobRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest instance */ - Rollout.create = function create(properties) { - return new Rollout(properties); + RetryJobRequest.create = function create(properties) { + return new RetryJobRequest(properties); }; /** - * Encodes the specified Rollout message. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * Encodes the specified RetryJobRequest message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest * @static - * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {google.cloud.deploy.v1.IRetryJobRequest} message RetryJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Rollout.encode = function encode(message, writer) { + RetryJobRequest.encode = function encode(message, writer) { 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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - 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.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.approveTime != null && Object.hasOwnProperty.call(message, "approveTime")) - $root.google.protobuf.Timestamp.encode(message.approveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.enqueueTime != null && Object.hasOwnProperty.call(message, "enqueueTime")) - $root.google.protobuf.Timestamp.encode(message.enqueueTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.deployStartTime != null && Object.hasOwnProperty.call(message, "deployStartTime")) - $root.google.protobuf.Timestamp.encode(message.deployStartTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.deployEndTime != null && Object.hasOwnProperty.call(message, "deployEndTime")) - $root.google.protobuf.Timestamp.encode(message.deployEndTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.approvalState != null && Object.hasOwnProperty.call(message, "approvalState")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.approvalState); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.state); - if (message.failureReason != null && Object.hasOwnProperty.call(message, "failureReason")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.failureReason); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.etag); - if (message.deployingBuild != null && Object.hasOwnProperty.call(message, "deployingBuild")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.deployingBuild); - if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.targetId); - if (message.deployFailureCause != null && Object.hasOwnProperty.call(message, "deployFailureCause")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.deployFailureCause); - if (message.phases != null && message.phases.length) - for (var i = 0; i < message.phases.length; ++i) - $root.google.cloud.deploy.v1.Phase.encode(message.phases[i], writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.deploy.v1.Metadata.encode(message.metadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.controllerRollout != null && Object.hasOwnProperty.call(message, "controllerRollout")) - writer.uint32(/* id 25, wireType 2 =*/202).string(message.controllerRollout); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); return writer; }; /** - * Encodes the specified Rollout message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollout.verify|verify} messages. + * Encodes the specified RetryJobRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest * @static - * @param {google.cloud.deploy.v1.IRollout} message Rollout message or plain object to encode + * @param {google.cloud.deploy.v1.IRetryJobRequest} message RetryJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Rollout.encodeDelimited = function encodeDelimited(message, writer) { + RetryJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Rollout message from the specified reader or buffer. + * Decodes a RetryJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rollout.decode = function decode(reader, length) { + RetryJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Rollout(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.rollout = reader.string(); break; } case 2: { - message.uid = reader.string(); + message.phaseId = reader.string(); break; } case 3: { - message.description = 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: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.approveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.enqueueTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.deployStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.deployEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 18: { - message.targetId = reader.string(); - break; - } - case 12: { - message.approvalState = reader.int32(); - break; - } - case 13: { - message.state = reader.int32(); - break; - } - case 14: { - message.failureReason = reader.string(); - break; - } - case 17: { - message.deployingBuild = reader.string(); - break; - } - case 16: { - message.etag = reader.string(); - break; - } - case 19: { - message.deployFailureCause = reader.int32(); - break; - } - case 23: { - if (!(message.phases && message.phases.length)) - message.phases = []; - message.phases.push($root.google.cloud.deploy.v1.Phase.decode(reader, reader.uint32())); - break; - } - case 24: { - message.metadata = $root.google.cloud.deploy.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 25: { - message.controllerRollout = reader.string(); + message.jobId = reader.string(); break; } default: @@ -17781,577 +27391,516 @@ }; /** - * Decodes a Rollout message from the specified reader or buffer, length delimited. + * Decodes a RetryJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryJobRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + return null; + }; + + /** + * Creates a RetryJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + */ + RetryJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RetryJobRequest) + return object; + var message = new $root.google.cloud.deploy.v1.RetryJobRequest(); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.phaseId != null) + message.phaseId = String(object.phaseId); + if (object.jobId != null) + message.jobId = String(object.jobId); + return message; + }; + + /** + * Creates a plain object from a RetryJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {google.cloud.deploy.v1.RetryJobRequest} message RetryJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rollout = ""; + object.phaseId = ""; + object.jobId = ""; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + return object; + }; + + /** + * Converts this RetryJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @instance + * @returns {Object.} JSON object + */ + RetryJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetryJobRequest + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RetryJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RetryJobRequest"; + }; + + return RetryJobRequest; + })(); + + v1.RetryJobResponse = (function() { + + /** + * Properties of a RetryJobResponse. + * @memberof google.cloud.deploy.v1 + * @interface IRetryJobResponse + */ + + /** + * Constructs a new RetryJobResponse. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RetryJobResponse. + * @implements IRetryJobResponse + * @constructor + * @param {google.cloud.deploy.v1.IRetryJobResponse=} [properties] Properties to set + */ + function RetryJobResponse(properties) { + if (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 RetryJobResponse instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.IRetryJobResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse instance + */ + RetryJobResponse.create = function create(properties) { + return new RetryJobResponse(properties); + }; + + /** + * Encodes the specified RetryJobResponse message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.IRetryJobResponse} message RetryJobResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryJobResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RetryJobResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.IRetryJobResponse} message RetryJobResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryJobResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetryJobResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryJobResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryJobResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetryJobResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Rollout.decodeDelimited = function decodeDelimited(reader) { + RetryJobResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Rollout message. + * Verifies a RetryJobResponse message. * @function verify - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Rollout.verify = function verify(message) { + RetryJobResponse.verify = function verify(message) { if (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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: 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.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.approveTime != null && message.hasOwnProperty("approveTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.approveTime); - if (error) - return "approveTime." + error; - } - if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.enqueueTime); - if (error) - return "enqueueTime." + error; - } - if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deployStartTime); - if (error) - return "deployStartTime." + error; - } - if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deployEndTime); - if (error) - return "deployEndTime." + error; - } - if (message.targetId != null && message.hasOwnProperty("targetId")) - if (!$util.isString(message.targetId)) - return "targetId: string expected"; - if (message.approvalState != null && message.hasOwnProperty("approvalState")) - switch (message.approvalState) { - default: - return "approvalState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - break; - } - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - if (!$util.isString(message.failureReason)) - return "failureReason: string expected"; - if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) - if (!$util.isString(message.deployingBuild)) - return "deployingBuild: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) - switch (message.deployFailureCause) { - default: - return "deployFailureCause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.phases != null && message.hasOwnProperty("phases")) { - if (!Array.isArray(message.phases)) - return "phases: array expected"; - for (var i = 0; i < message.phases.length; ++i) { - var error = $root.google.cloud.deploy.v1.Phase.verify(message.phases[i]); - if (error) - return "phases." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.cloud.deploy.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.controllerRollout != null && message.hasOwnProperty("controllerRollout")) - if (!$util.isString(message.controllerRollout)) - return "controllerRollout: string expected"; return null; }; /** - * Creates a Rollout message from a plain object. Also converts values to their respective internal types. + * Creates a RetryJobResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.RetryJobResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Rollout} Rollout + * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse */ - Rollout.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Rollout) + RetryJobResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RetryJobResponse) return object; - var message = new $root.google.cloud.deploy.v1.Rollout(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.description != null) - message.description = String(object.description); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.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.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.approveTime != null) { - if (typeof object.approveTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.approveTime: object expected"); - message.approveTime = $root.google.protobuf.Timestamp.fromObject(object.approveTime); - } - if (object.enqueueTime != null) { - if (typeof object.enqueueTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.enqueueTime: object expected"); - message.enqueueTime = $root.google.protobuf.Timestamp.fromObject(object.enqueueTime); - } - if (object.deployStartTime != null) { - if (typeof object.deployStartTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.deployStartTime: object expected"); - message.deployStartTime = $root.google.protobuf.Timestamp.fromObject(object.deployStartTime); - } - if (object.deployEndTime != null) { - if (typeof object.deployEndTime !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.deployEndTime: object expected"); - message.deployEndTime = $root.google.protobuf.Timestamp.fromObject(object.deployEndTime); - } - if (object.targetId != null) - message.targetId = String(object.targetId); - switch (object.approvalState) { - default: - if (typeof object.approvalState === "number") { - message.approvalState = object.approvalState; - break; - } - break; - case "APPROVAL_STATE_UNSPECIFIED": - case 0: - message.approvalState = 0; - break; - case "NEEDS_APPROVAL": - case 1: - message.approvalState = 1; - break; - case "DOES_NOT_NEED_APPROVAL": - case 2: - message.approvalState = 2; - break; - case "APPROVED": - case 3: - message.approvalState = 3; - break; - case "REJECTED": - case 4: - message.approvalState = 4; - break; - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "IN_PROGRESS": - case 3: - message.state = 3; - break; - case "PENDING_APPROVAL": - case 4: - message.state = 4; - break; - case "APPROVAL_REJECTED": - case 5: - message.state = 5; - break; - case "PENDING": - case 6: - message.state = 6; - break; - case "PENDING_RELEASE": - case 7: - message.state = 7; - break; - case "CANCELLING": - case 8: - message.state = 8; - break; - case "CANCELLED": - case 9: - message.state = 9; - break; - case "HALTED": - case 10: - message.state = 10; - break; - } - if (object.failureReason != null) - message.failureReason = String(object.failureReason); - if (object.deployingBuild != null) - message.deployingBuild = String(object.deployingBuild); - if (object.etag != null) - message.etag = String(object.etag); - switch (object.deployFailureCause) { - default: - if (typeof object.deployFailureCause === "number") { - message.deployFailureCause = object.deployFailureCause; - break; - } - break; - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.deployFailureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.deployFailureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.deployFailureCause = 2; - break; - case "DEADLINE_EXCEEDED": - case 3: - message.deployFailureCause = 3; - break; - case "RELEASE_FAILED": - case 4: - message.deployFailureCause = 4; - break; - case "RELEASE_ABANDONED": - case 5: - message.deployFailureCause = 5; - break; - case "VERIFICATION_CONFIG_NOT_FOUND": - case 6: - message.deployFailureCause = 6; - break; - case "CLOUD_BUILD_REQUEST_FAILED": - case 7: - message.deployFailureCause = 7; - break; + return new $root.google.cloud.deploy.v1.RetryJobResponse(); + }; + + /** + * Creates a plain object from a RetryJobResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {google.cloud.deploy.v1.RetryJobResponse} message RetryJobResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryJobResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RetryJobResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @instance + * @returns {Object.} JSON object + */ + RetryJobResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetryJobResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RetryJobResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.phases) { - if (!Array.isArray(object.phases)) - throw TypeError(".google.cloud.deploy.v1.Rollout.phases: array expected"); - message.phases = []; - for (var i = 0; i < object.phases.length; ++i) { - if (typeof object.phases[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.phases: object expected"); - message.phases[i] = $root.google.cloud.deploy.v1.Phase.fromObject(object.phases[i]); + return typeUrlPrefix + "/google.cloud.deploy.v1.RetryJobResponse"; + }; + + return RetryJobResponse; + })(); + + v1.AbandonReleaseRequest = (function() { + + /** + * Properties of an AbandonReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @interface IAbandonReleaseRequest + * @property {string|null} [name] AbandonReleaseRequest name + */ + + /** + * Constructs a new AbandonReleaseRequest. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an AbandonReleaseRequest. + * @implements IAbandonReleaseRequest + * @constructor + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest=} [properties] Properties to set + */ + function AbandonReleaseRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbandonReleaseRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @instance + */ + AbandonReleaseRequest.prototype.name = ""; + + /** + * Creates a new AbandonReleaseRequest instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest instance + */ + AbandonReleaseRequest.create = function create(properties) { + return new AbandonReleaseRequest(properties); + }; + + /** + * Encodes the specified AbandonReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} message AbandonReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonReleaseRequest.encode = function encode(message, writer) { + 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 AbandonReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} message AbandonReleaseRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbandonReleaseRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonReleaseRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AbandonReleaseRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.deploy.v1.Rollout.metadata: object expected"); - message.metadata = $root.google.cloud.deploy.v1.Metadata.fromObject(object.metadata); - } - if (object.controllerRollout != null) - message.controllerRollout = String(object.controllerRollout); return message; }; /** - * Creates a plain object from a Rollout message. Also converts values to other types if specified. + * Decodes an AbandonReleaseRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbandonReleaseRequest message. + * @function verify + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbandonReleaseRequest.verify = function verify(message) { + if (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 an AbandonReleaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + */ + AbandonReleaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AbandonReleaseRequest) + return object; + var message = new $root.google.cloud.deploy.v1.AbandonReleaseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an AbandonReleaseRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest * @static - * @param {google.cloud.deploy.v1.Rollout} message Rollout + * @param {google.cloud.deploy.v1.AbandonReleaseRequest} message AbandonReleaseRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Rollout.toObject = function toObject(message, options) { + AbandonReleaseRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.phases = []; - if (options.objects || options.defaults) { - object.annotations = {}; - object.labels = {}; - } - if (options.defaults) { + if (options.defaults) object.name = ""; - object.uid = ""; - object.description = ""; - object.createTime = null; - object.approveTime = null; - object.enqueueTime = null; - object.deployStartTime = null; - object.deployEndTime = null; - object.approvalState = options.enums === String ? "APPROVAL_STATE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.failureReason = ""; - object.etag = ""; - object.deployingBuild = ""; - object.targetId = ""; - object.deployFailureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - object.metadata = null; - object.controllerRollout = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.approveTime != null && message.hasOwnProperty("approveTime")) - object.approveTime = $root.google.protobuf.Timestamp.toObject(message.approveTime, options); - if (message.enqueueTime != null && message.hasOwnProperty("enqueueTime")) - object.enqueueTime = $root.google.protobuf.Timestamp.toObject(message.enqueueTime, options); - if (message.deployStartTime != null && message.hasOwnProperty("deployStartTime")) - object.deployStartTime = $root.google.protobuf.Timestamp.toObject(message.deployStartTime, options); - if (message.deployEndTime != null && message.hasOwnProperty("deployEndTime")) - object.deployEndTime = $root.google.protobuf.Timestamp.toObject(message.deployEndTime, options); - if (message.approvalState != null && message.hasOwnProperty("approvalState")) - object.approvalState = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] === undefined ? message.approvalState : $root.google.cloud.deploy.v1.Rollout.ApprovalState[message.approvalState] : message.approvalState; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.Rollout.State[message.state] : message.state; - if (message.failureReason != null && message.hasOwnProperty("failureReason")) - object.failureReason = message.failureReason; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.deployingBuild != null && message.hasOwnProperty("deployingBuild")) - object.deployingBuild = message.deployingBuild; - if (message.targetId != null && message.hasOwnProperty("targetId")) - object.targetId = message.targetId; - if (message.deployFailureCause != null && message.hasOwnProperty("deployFailureCause")) - object.deployFailureCause = options.enums === String ? $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] === undefined ? message.deployFailureCause : $root.google.cloud.deploy.v1.Rollout.FailureCause[message.deployFailureCause] : message.deployFailureCause; - if (message.phases && message.phases.length) { - object.phases = []; - for (var j = 0; j < message.phases.length; ++j) - object.phases[j] = $root.google.cloud.deploy.v1.Phase.toObject(message.phases[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.deploy.v1.Metadata.toObject(message.metadata, options); - if (message.controllerRollout != null && message.hasOwnProperty("controllerRollout")) - object.controllerRollout = message.controllerRollout; return object; }; /** - * Converts this Rollout to JSON. + * Converts this AbandonReleaseRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest * @instance * @returns {Object.} JSON object */ - Rollout.prototype.toJSON = function toJSON() { + AbandonReleaseRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Rollout + * Gets the default type url for AbandonReleaseRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Rollout + * @memberof google.cloud.deploy.v1.AbandonReleaseRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Rollout.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AbandonReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Rollout"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AbandonReleaseRequest"; }; - /** - * ApprovalState enum. - * @name google.cloud.deploy.v1.Rollout.ApprovalState - * @enum {number} - * @property {number} APPROVAL_STATE_UNSPECIFIED=0 APPROVAL_STATE_UNSPECIFIED value - * @property {number} NEEDS_APPROVAL=1 NEEDS_APPROVAL value - * @property {number} DOES_NOT_NEED_APPROVAL=2 DOES_NOT_NEED_APPROVAL value - * @property {number} APPROVED=3 APPROVED value - * @property {number} REJECTED=4 REJECTED value - */ - Rollout.ApprovalState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "APPROVAL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEEDS_APPROVAL"] = 1; - values[valuesById[2] = "DOES_NOT_NEED_APPROVAL"] = 2; - values[valuesById[3] = "APPROVED"] = 3; - values[valuesById[4] = "REJECTED"] = 4; - return values; - })(); - - /** - * State enum. - * @name google.cloud.deploy.v1.Rollout.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value - * @property {number} PENDING_APPROVAL=4 PENDING_APPROVAL value - * @property {number} APPROVAL_REJECTED=5 APPROVAL_REJECTED value - * @property {number} PENDING=6 PENDING value - * @property {number} PENDING_RELEASE=7 PENDING_RELEASE value - * @property {number} CANCELLING=8 CANCELLING value - * @property {number} CANCELLED=9 CANCELLED value - * @property {number} HALTED=10 HALTED value - */ - Rollout.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - values[valuesById[4] = "PENDING_APPROVAL"] = 4; - values[valuesById[5] = "APPROVAL_REJECTED"] = 5; - values[valuesById[6] = "PENDING"] = 6; - values[valuesById[7] = "PENDING_RELEASE"] = 7; - values[valuesById[8] = "CANCELLING"] = 8; - values[valuesById[9] = "CANCELLED"] = 9; - values[valuesById[10] = "HALTED"] = 10; - return values; - })(); - - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.Rollout.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value - * @property {number} RELEASE_FAILED=4 RELEASE_FAILED value - * @property {number} RELEASE_ABANDONED=5 RELEASE_ABANDONED value - * @property {number} VERIFICATION_CONFIG_NOT_FOUND=6 VERIFICATION_CONFIG_NOT_FOUND value - * @property {number} CLOUD_BUILD_REQUEST_FAILED=7 CLOUD_BUILD_REQUEST_FAILED value - */ - Rollout.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; - values[valuesById[4] = "RELEASE_FAILED"] = 4; - values[valuesById[5] = "RELEASE_ABANDONED"] = 5; - values[valuesById[6] = "VERIFICATION_CONFIG_NOT_FOUND"] = 6; - values[valuesById[7] = "CLOUD_BUILD_REQUEST_FAILED"] = 7; - return values; - })(); - - return Rollout; + return AbandonReleaseRequest; })(); - v1.Metadata = (function() { + v1.AbandonReleaseResponse = (function() { /** - * Properties of a Metadata. + * Properties of an AbandonReleaseResponse. * @memberof google.cloud.deploy.v1 - * @interface IMetadata - * @property {google.cloud.deploy.v1.ICloudRunMetadata|null} [cloudRun] Metadata cloudRun + * @interface IAbandonReleaseResponse */ /** - * Constructs a new Metadata. + * Constructs a new AbandonReleaseResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata + * @classdesc Represents an AbandonReleaseResponse. + * @implements IAbandonReleaseResponse * @constructor - * @param {google.cloud.deploy.v1.IMetadata=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse=} [properties] Properties to set */ - function Metadata(properties) { + function AbandonReleaseResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18359,77 +27908,63 @@ } /** - * Metadata cloudRun. - * @member {google.cloud.deploy.v1.ICloudRunMetadata|null|undefined} cloudRun - * @memberof google.cloud.deploy.v1.Metadata - * @instance - */ - Metadata.prototype.cloudRun = null; - - /** - * Creates a new Metadata instance using the specified properties. + * Creates a new AbandonReleaseResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.IMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Metadata} Metadata instance + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse instance */ - Metadata.create = function create(properties) { - return new Metadata(properties); + AbandonReleaseResponse.create = function create(properties) { + return new AbandonReleaseResponse(properties); }; /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * Encodes the specified AbandonReleaseResponse message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.IMetadata} message Metadata message or plain object to encode + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse} message AbandonReleaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metadata.encode = function encode(message, writer) { + AbandonReleaseResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) - $root.google.cloud.deploy.v1.CloudRunMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Metadata.verify|verify} messages. + * Encodes the specified AbandonReleaseResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static - * @param {google.cloud.deploy.v1.IMetadata} message Metadata message or plain object to encode + * @param {google.cloud.deploy.v1.IAbandonReleaseResponse} message AbandonReleaseResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { + AbandonReleaseResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metadata message from the specified reader or buffer. + * Decodes an AbandonReleaseResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metadata.decode = function decode(reader, length) { + AbandonReleaseResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Metadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AbandonReleaseResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -18439,203 +27974,409 @@ }; /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. + * Decodes an AbandonReleaseResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metadata.decodeDelimited = function decodeDelimited(reader) { + AbandonReleaseResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metadata message. + * Verifies an AbandonReleaseResponse message. * @function verify - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metadata.verify = function verify(message) { + AbandonReleaseResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { - var error = $root.google.cloud.deploy.v1.CloudRunMetadata.verify(message.cloudRun); - if (error) - return "cloudRun." + error; - } return null; }; /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * Creates an AbandonReleaseResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Metadata + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Metadata} Metadata + * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Metadata) + AbandonReleaseResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AbandonReleaseResponse) return object; - var message = new $root.google.cloud.deploy.v1.Metadata(); - if (object.cloudRun != null) { - if (typeof object.cloudRun !== "object") - throw TypeError(".google.cloud.deploy.v1.Metadata.cloudRun: object expected"); - message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.fromObject(object.cloudRun); + return new $root.google.cloud.deploy.v1.AbandonReleaseResponse(); + }; + + /** + * Creates a plain object from an AbandonReleaseResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @static + * @param {google.cloud.deploy.v1.AbandonReleaseResponse} message AbandonReleaseResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbandonReleaseResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AbandonReleaseResponse to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @instance + * @returns {Object.} JSON object + */ + AbandonReleaseResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbandonReleaseResponse + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbandonReleaseResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - return message; + return typeUrlPrefix + "/google.cloud.deploy.v1.AbandonReleaseResponse"; }; + return AbandonReleaseResponse; + })(); + + v1.JobRun = (function() { + + /** + * Properties of a JobRun. + * @memberof google.cloud.deploy.v1 + * @interface IJobRun + * @property {string|null} [name] JobRun name + * @property {string|null} [uid] JobRun uid + * @property {string|null} [phaseId] JobRun phaseId + * @property {string|null} [jobId] JobRun jobId + * @property {google.protobuf.ITimestamp|null} [createTime] JobRun createTime + * @property {google.protobuf.ITimestamp|null} [startTime] JobRun startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobRun endTime + * @property {google.cloud.deploy.v1.JobRun.State|null} [state] JobRun state + * @property {google.cloud.deploy.v1.IDeployJobRun|null} [deployJobRun] JobRun deployJobRun + * @property {google.cloud.deploy.v1.IVerifyJobRun|null} [verifyJobRun] JobRun verifyJobRun + * @property {google.cloud.deploy.v1.IPredeployJobRun|null} [predeployJobRun] JobRun predeployJobRun + * @property {google.cloud.deploy.v1.IPostdeployJobRun|null} [postdeployJobRun] JobRun postdeployJobRun + * @property {google.cloud.deploy.v1.ICreateChildRolloutJobRun|null} [createChildRolloutJobRun] JobRun createChildRolloutJobRun + * @property {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun|null} [advanceChildRolloutJobRun] JobRun advanceChildRolloutJobRun + * @property {string|null} [etag] JobRun etag + */ + + /** + * Constructs a new JobRun. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a JobRun. + * @implements IJobRun + * @constructor + * @param {google.cloud.deploy.v1.IJobRun=} [properties] Properties to set + */ + function JobRun(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobRun name. + * @member {string} name + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.name = ""; + + /** + * JobRun uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.uid = ""; + + /** + * JobRun phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.phaseId = ""; + + /** + * JobRun jobId. + * @member {string} jobId + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.jobId = ""; + + /** + * JobRun createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.createTime = null; + + /** + * JobRun startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.startTime = null; + + /** + * JobRun endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.endTime = null; + + /** + * JobRun state. + * @member {google.cloud.deploy.v1.JobRun.State} state + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.state = 0; + /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.Metadata - * @static - * @param {google.cloud.deploy.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * JobRun deployJobRun. + * @member {google.cloud.deploy.v1.IDeployJobRun|null|undefined} deployJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cloudRun = null; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) - object.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.toObject(message.cloudRun, options); - return object; - }; + JobRun.prototype.deployJobRun = null; /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof google.cloud.deploy.v1.Metadata + * JobRun verifyJobRun. + * @member {google.cloud.deploy.v1.IVerifyJobRun|null|undefined} verifyJobRun + * @memberof google.cloud.deploy.v1.JobRun * @instance - * @returns {Object.} JSON object */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + JobRun.prototype.verifyJobRun = null; /** - * Gets the default type url for Metadata - * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Metadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * JobRun predeployJobRun. + * @member {google.cloud.deploy.v1.IPredeployJobRun|null|undefined} predeployJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.deploy.v1.Metadata"; - }; + JobRun.prototype.predeployJobRun = null; - return Metadata; - })(); + /** + * JobRun postdeployJobRun. + * @member {google.cloud.deploy.v1.IPostdeployJobRun|null|undefined} postdeployJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.postdeployJobRun = null; - v1.DeployJobRunMetadata = (function() { + /** + * JobRun createChildRolloutJobRun. + * @member {google.cloud.deploy.v1.ICreateChildRolloutJobRun|null|undefined} createChildRolloutJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance + */ + JobRun.prototype.createChildRolloutJobRun = null; /** - * Properties of a DeployJobRunMetadata. - * @memberof google.cloud.deploy.v1 - * @interface IDeployJobRunMetadata - * @property {google.cloud.deploy.v1.ICloudRunMetadata|null} [cloudRun] DeployJobRunMetadata cloudRun + * JobRun advanceChildRolloutJobRun. + * @member {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun|null|undefined} advanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.JobRun + * @instance */ + JobRun.prototype.advanceChildRolloutJobRun = null; /** - * Constructs a new DeployJobRunMetadata. - * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeployJobRunMetadata. - * @implements IDeployJobRunMetadata - * @constructor - * @param {google.cloud.deploy.v1.IDeployJobRunMetadata=} [properties] Properties to set + * JobRun etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.JobRun + * @instance */ - function DeployJobRunMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + JobRun.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DeployJobRunMetadata cloudRun. - * @member {google.cloud.deploy.v1.ICloudRunMetadata|null|undefined} cloudRun - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * JobRun jobRun. + * @member {"deployJobRun"|"verifyJobRun"|"predeployJobRun"|"postdeployJobRun"|"createChildRolloutJobRun"|"advanceChildRolloutJobRun"|undefined} jobRun + * @memberof google.cloud.deploy.v1.JobRun * @instance */ - DeployJobRunMetadata.prototype.cloudRun = null; + Object.defineProperty(JobRun.prototype, "jobRun", { + get: $util.oneOfGetter($oneOfFields = ["deployJobRun", "verifyJobRun", "predeployJobRun", "postdeployJobRun", "createChildRolloutJobRun", "advanceChildRolloutJobRun"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DeployJobRunMetadata instance using the specified properties. + * Creates a new JobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.IDeployJobRunMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata instance + * @param {google.cloud.deploy.v1.IJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.JobRun} JobRun instance */ - DeployJobRunMetadata.create = function create(properties) { - return new DeployJobRunMetadata(properties); + JobRun.create = function create(properties) { + return new JobRun(properties); }; /** - * Encodes the specified DeployJobRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * Encodes the specified JobRun message. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.IDeployJobRunMetadata} message DeployJobRunMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IJobRun} message JobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployJobRunMetadata.encode = function encode(message, writer) { + JobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) - $root.google.cloud.deploy.v1.CloudRunMetadata.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.phaseId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); + 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.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, 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.deployJobRun != null && Object.hasOwnProperty.call(message, "deployJobRun")) + $root.google.cloud.deploy.v1.DeployJobRun.encode(message.deployJobRun, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.verifyJobRun != null && Object.hasOwnProperty.call(message, "verifyJobRun")) + $root.google.cloud.deploy.v1.VerifyJobRun.encode(message.verifyJobRun, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.createChildRolloutJobRun != null && Object.hasOwnProperty.call(message, "createChildRolloutJobRun")) + $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.encode(message.createChildRolloutJobRun, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.advanceChildRolloutJobRun != null && Object.hasOwnProperty.call(message, "advanceChildRolloutJobRun")) + $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.encode(message.advanceChildRolloutJobRun, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.predeployJobRun != null && Object.hasOwnProperty.call(message, "predeployJobRun")) + $root.google.cloud.deploy.v1.PredeployJobRun.encode(message.predeployJobRun, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.postdeployJobRun != null && Object.hasOwnProperty.call(message, "postdeployJobRun")) + $root.google.cloud.deploy.v1.PostdeployJobRun.encode(message.postdeployJobRun, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeployJobRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRunMetadata.verify|verify} messages. + * Encodes the specified JobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static - * @param {google.cloud.deploy.v1.IDeployJobRunMetadata} message DeployJobRunMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IJobRun} message JobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployJobRunMetadata.encodeDelimited = function encodeDelimited(message, writer) { + JobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployJobRunMetadata message from the specified reader or buffer. + * Decodes a JobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + * @returns {google.cloud.deploy.v1.JobRun} JobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployJobRunMetadata.decode = function decode(reader, length) { + JobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJobRunMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.JobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.phaseId = reader.string(); + break; + } + case 4: { + message.jobId = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.decode(reader, reader.uint32()); + break; + } + case 10: { + message.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.decode(reader, reader.uint32()); + break; + } + case 14: { + message.predeployJobRun = $root.google.cloud.deploy.v1.PredeployJobRun.decode(reader, reader.uint32()); + break; + } + case 15: { + message.postdeployJobRun = $root.google.cloud.deploy.v1.PostdeployJobRun.decode(reader, reader.uint32()); + break; + } + case 12: { + message.createChildRolloutJobRun = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.decode(reader, reader.uint32()); + break; + } + case 13: { + message.advanceChildRolloutJobRun = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); break; } default: @@ -18647,130 +28388,386 @@ }; /** - * Decodes a DeployJobRunMetadata message from the specified reader or buffer, length delimited. + * Decodes a JobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata + * @returns {google.cloud.deploy.v1.JobRun} JobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployJobRunMetadata.decodeDelimited = function decodeDelimited(reader) { + JobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployJobRunMetadata message. + * Verifies a JobRun message. * @function verify - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployJobRunMetadata.verify = function verify(message) { + JobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { - var error = $root.google.cloud.deploy.v1.CloudRunMetadata.verify(message.cloudRun); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "cloudRun." + 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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.deployJobRun != null && message.hasOwnProperty("deployJobRun")) { + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.DeployJobRun.verify(message.deployJobRun); + if (error) + return "deployJobRun." + error; + } + } + if (message.verifyJobRun != null && message.hasOwnProperty("verifyJobRun")) { + if (properties.jobRun === 1) + return "jobRun: multiple values"; + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.VerifyJobRun.verify(message.verifyJobRun); + if (error) + return "verifyJobRun." + error; + } + } + if (message.predeployJobRun != null && message.hasOwnProperty("predeployJobRun")) { + if (properties.jobRun === 1) + return "jobRun: multiple values"; + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.PredeployJobRun.verify(message.predeployJobRun); + if (error) + return "predeployJobRun." + error; + } + } + if (message.postdeployJobRun != null && message.hasOwnProperty("postdeployJobRun")) { + if (properties.jobRun === 1) + return "jobRun: multiple values"; + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.PostdeployJobRun.verify(message.postdeployJobRun); + if (error) + return "postdeployJobRun." + error; + } + } + if (message.createChildRolloutJobRun != null && message.hasOwnProperty("createChildRolloutJobRun")) { + if (properties.jobRun === 1) + return "jobRun: multiple values"; + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.verify(message.createChildRolloutJobRun); + if (error) + return "createChildRolloutJobRun." + error; + } + } + if (message.advanceChildRolloutJobRun != null && message.hasOwnProperty("advanceChildRolloutJobRun")) { + if (properties.jobRun === 1) + return "jobRun: multiple values"; + properties.jobRun = 1; + { + var error = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.verify(message.advanceChildRolloutJobRun); + if (error) + return "advanceChildRolloutJobRun." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a JobRun message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.JobRun + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.JobRun} JobRun + */ + JobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.JobRun) + return object; + var message = new $root.google.cloud.deploy.v1.JobRun(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.phaseId != null) + message.phaseId = String(object.phaseId); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "IN_PROGRESS": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "TERMINATING": + case 4: + message.state = 4; + break; + case "TERMINATED": + case 5: + message.state = 5; + break; + } + if (object.deployJobRun != null) { + if (typeof object.deployJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.deployJobRun: object expected"); + message.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.fromObject(object.deployJobRun); + } + if (object.verifyJobRun != null) { + if (typeof object.verifyJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.verifyJobRun: object expected"); + message.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.fromObject(object.verifyJobRun); + } + if (object.predeployJobRun != null) { + if (typeof object.predeployJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.predeployJobRun: object expected"); + message.predeployJobRun = $root.google.cloud.deploy.v1.PredeployJobRun.fromObject(object.predeployJobRun); + } + if (object.postdeployJobRun != null) { + if (typeof object.postdeployJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.postdeployJobRun: object expected"); + message.postdeployJobRun = $root.google.cloud.deploy.v1.PostdeployJobRun.fromObject(object.postdeployJobRun); + } + if (object.createChildRolloutJobRun != null) { + if (typeof object.createChildRolloutJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.createChildRolloutJobRun: object expected"); + message.createChildRolloutJobRun = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.fromObject(object.createChildRolloutJobRun); + } + if (object.advanceChildRolloutJobRun != null) { + if (typeof object.advanceChildRolloutJobRun !== "object") + throw TypeError(".google.cloud.deploy.v1.JobRun.advanceChildRolloutJobRun: object expected"); + message.advanceChildRolloutJobRun = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.fromObject(object.advanceChildRolloutJobRun); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a JobRun message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.JobRun + * @static + * @param {google.cloud.deploy.v1.JobRun} message JobRun + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobRun.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.phaseId = ""; + object.jobId = ""; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + 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.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.JobRun.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.JobRun.State[message.state] : message.state; + if (message.deployJobRun != null && message.hasOwnProperty("deployJobRun")) { + object.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.toObject(message.deployJobRun, options); + if (options.oneofs) + object.jobRun = "deployJobRun"; + } + if (message.verifyJobRun != null && message.hasOwnProperty("verifyJobRun")) { + object.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.toObject(message.verifyJobRun, options); + if (options.oneofs) + object.jobRun = "verifyJobRun"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.createChildRolloutJobRun != null && message.hasOwnProperty("createChildRolloutJobRun")) { + object.createChildRolloutJobRun = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.toObject(message.createChildRolloutJobRun, options); + if (options.oneofs) + object.jobRun = "createChildRolloutJobRun"; } - return null; - }; - - /** - * Creates a DeployJobRunMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeployJobRunMetadata} DeployJobRunMetadata - */ - DeployJobRunMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeployJobRunMetadata) - return object; - var message = new $root.google.cloud.deploy.v1.DeployJobRunMetadata(); - if (object.cloudRun != null) { - if (typeof object.cloudRun !== "object") - throw TypeError(".google.cloud.deploy.v1.DeployJobRunMetadata.cloudRun: object expected"); - message.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.fromObject(object.cloudRun); + if (message.advanceChildRolloutJobRun != null && message.hasOwnProperty("advanceChildRolloutJobRun")) { + object.advanceChildRolloutJobRun = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.toObject(message.advanceChildRolloutJobRun, options); + if (options.oneofs) + object.jobRun = "advanceChildRolloutJobRun"; + } + if (message.predeployJobRun != null && message.hasOwnProperty("predeployJobRun")) { + object.predeployJobRun = $root.google.cloud.deploy.v1.PredeployJobRun.toObject(message.predeployJobRun, options); + if (options.oneofs) + object.jobRun = "predeployJobRun"; + } + if (message.postdeployJobRun != null && message.hasOwnProperty("postdeployJobRun")) { + object.postdeployJobRun = $root.google.cloud.deploy.v1.PostdeployJobRun.toObject(message.postdeployJobRun, options); + if (options.oneofs) + object.jobRun = "postdeployJobRun"; } - return message; - }; - - /** - * Creates a plain object from a DeployJobRunMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata - * @static - * @param {google.cloud.deploy.v1.DeployJobRunMetadata} message DeployJobRunMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeployJobRunMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.cloudRun = null; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) - object.cloudRun = $root.google.cloud.deploy.v1.CloudRunMetadata.toObject(message.cloudRun, options); return object; }; /** - * Converts this DeployJobRunMetadata to JSON. + * Converts this JobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @instance * @returns {Object.} JSON object */ - DeployJobRunMetadata.prototype.toJSON = function toJSON() { + JobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployJobRunMetadata + * Gets the default type url for JobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeployJobRunMetadata + * @memberof google.cloud.deploy.v1.JobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployJobRunMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + JobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJobRunMetadata"; + return typeUrlPrefix + "/google.cloud.deploy.v1.JobRun"; }; - return DeployJobRunMetadata; + /** + * State enum. + * @name google.cloud.deploy.v1.JobRun.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} IN_PROGRESS=1 IN_PROGRESS value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} TERMINATING=4 TERMINATING value + * @property {number} TERMINATED=5 TERMINATED value + */ + JobRun.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN_PROGRESS"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "TERMINATING"] = 4; + values[valuesById[5] = "TERMINATED"] = 5; + return values; + })(); + + return JobRun; })(); - v1.CloudRunMetadata = (function() { + v1.DeployJobRun = (function() { /** - * Properties of a CloudRunMetadata. + * Properties of a DeployJobRun. * @memberof google.cloud.deploy.v1 - * @interface ICloudRunMetadata - * @property {string|null} [service] CloudRunMetadata service - * @property {Array.|null} [serviceUrls] CloudRunMetadata serviceUrls - * @property {string|null} [revision] CloudRunMetadata revision + * @interface IDeployJobRun + * @property {string|null} [build] DeployJobRun build + * @property {google.cloud.deploy.v1.DeployJobRun.FailureCause|null} [failureCause] DeployJobRun failureCause + * @property {string|null} [failureMessage] DeployJobRun failureMessage + * @property {google.cloud.deploy.v1.IDeployJobRunMetadata|null} [metadata] DeployJobRun metadata + * @property {google.cloud.deploy.v1.IDeployArtifact|null} [artifact] DeployJobRun artifact */ /** - * Constructs a new CloudRunMetadata. + * Constructs a new DeployJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CloudRunMetadata. - * @implements ICloudRunMetadata + * @classdesc Represents a DeployJobRun. + * @implements IDeployJobRun * @constructor - * @param {google.cloud.deploy.v1.ICloudRunMetadata=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDeployJobRun=} [properties] Properties to set */ - function CloudRunMetadata(properties) { - this.serviceUrls = []; + function DeployJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18778,106 +28775,131 @@ } /** - * CloudRunMetadata service. - * @member {string} service - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * DeployJobRun build. + * @member {string} build + * @memberof google.cloud.deploy.v1.DeployJobRun * @instance */ - CloudRunMetadata.prototype.service = ""; + DeployJobRun.prototype.build = ""; /** - * CloudRunMetadata serviceUrls. - * @member {Array.} serviceUrls - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * DeployJobRun failureCause. + * @member {google.cloud.deploy.v1.DeployJobRun.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.DeployJobRun * @instance */ - CloudRunMetadata.prototype.serviceUrls = $util.emptyArray; + DeployJobRun.prototype.failureCause = 0; /** - * CloudRunMetadata revision. - * @member {string} revision - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * DeployJobRun failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.DeployJobRun * @instance */ - CloudRunMetadata.prototype.revision = ""; + DeployJobRun.prototype.failureMessage = ""; /** - * Creates a new CloudRunMetadata instance using the specified properties. + * DeployJobRun metadata. + * @member {google.cloud.deploy.v1.IDeployJobRunMetadata|null|undefined} metadata + * @memberof google.cloud.deploy.v1.DeployJobRun + * @instance + */ + DeployJobRun.prototype.metadata = null; + + /** + * DeployJobRun artifact. + * @member {google.cloud.deploy.v1.IDeployArtifact|null|undefined} artifact + * @memberof google.cloud.deploy.v1.DeployJobRun + * @instance + */ + DeployJobRun.prototype.artifact = null; + + /** + * Creates a new DeployJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.ICloudRunMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata instance + * @param {google.cloud.deploy.v1.IDeployJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun instance */ - CloudRunMetadata.create = function create(properties) { - return new CloudRunMetadata(properties); + DeployJobRun.create = function create(properties) { + return new DeployJobRun(properties); }; /** - * Encodes the specified CloudRunMetadata message. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * Encodes the specified DeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.ICloudRunMetadata} message CloudRunMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IDeployJobRun} message DeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRunMetadata.encode = function encode(message, writer) { + DeployJobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.serviceUrls != null && message.serviceUrls.length) - for (var i = 0; i < message.serviceUrls.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceUrls[i]); - if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.revision); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.deploy.v1.DeployJobRunMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.artifact != null && Object.hasOwnProperty.call(message, "artifact")) + $root.google.cloud.deploy.v1.DeployArtifact.encode(message.artifact, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudRunMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CloudRunMetadata.verify|verify} messages. + * Encodes the specified DeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.ICloudRunMetadata} message CloudRunMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IDeployJobRun} message DeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRunMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudRunMetadata message from the specified reader or buffer. + * Decodes a DeployJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRunMetadata.decode = function decode(reader, length) { + DeployJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CloudRunMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.service = reader.string(); + message.build = reader.string(); break; } case 2: { - if (!(message.serviceUrls && message.serviceUrls.length)) - message.serviceUrls = []; - message.serviceUrls.push(reader.string()); + message.failureCause = reader.int32(); break; } case 3: { - message.revision = reader.string(); + message.failureMessage = reader.string(); + break; + } + case 4: { + message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.decode(reader, reader.uint32()); + break; + } + case 5: { + message.artifact = $root.google.cloud.deploy.v1.DeployArtifact.decode(reader, reader.uint32()); break; } default: @@ -18889,156 +28911,230 @@ }; /** - * Decodes a CloudRunMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeployJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRunMetadata.decodeDelimited = function decodeDelimited(reader) { + DeployJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudRunMetadata message. + * Verifies a DeployJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudRunMetadata.verify = function verify(message) { + DeployJobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.serviceUrls != null && message.hasOwnProperty("serviceUrls")) { - if (!Array.isArray(message.serviceUrls)) - return "serviceUrls: array expected"; - for (var i = 0; i < message.serviceUrls.length; ++i) - if (!$util.isString(message.serviceUrls[i])) - return "serviceUrls: string[] expected"; + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.cloud.deploy.v1.DeployJobRunMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.artifact != null && message.hasOwnProperty("artifact")) { + var error = $root.google.cloud.deploy.v1.DeployArtifact.verify(message.artifact); + if (error) + return "artifact." + error; } - if (message.revision != null && message.hasOwnProperty("revision")) - if (!$util.isString(message.revision)) - return "revision: string expected"; return null; }; /** - * Creates a CloudRunMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeployJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CloudRunMetadata} CloudRunMetadata + * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun */ - CloudRunMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CloudRunMetadata) + DeployJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployJobRun) return object; - var message = new $root.google.cloud.deploy.v1.CloudRunMetadata(); - if (object.service != null) - message.service = String(object.service); - if (object.serviceUrls) { - if (!Array.isArray(object.serviceUrls)) - throw TypeError(".google.cloud.deploy.v1.CloudRunMetadata.serviceUrls: array expected"); - message.serviceUrls = []; - for (var i = 0; i < object.serviceUrls.length; ++i) - message.serviceUrls[i] = String(object.serviceUrls[i]); + var message = new $root.google.cloud.deploy.v1.DeployJobRun(); + if (object.build != null) + message.build = String(object.build); + switch (object.failureCause) { + default: + if (typeof object.failureCause === "number") { + message.failureCause = object.failureCause; + break; + } + break; + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.failureCause = 3; + break; + case "MISSING_RESOURCES_FOR_CANARY": + case 4: + message.failureCause = 4; + break; + case "CLOUD_BUILD_REQUEST_FAILED": + case 5: + message.failureCause = 5; + break; + } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.deploy.v1.DeployJobRun.metadata: object expected"); + message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.fromObject(object.metadata); + } + if (object.artifact != null) { + if (typeof object.artifact !== "object") + throw TypeError(".google.cloud.deploy.v1.DeployJobRun.artifact: object expected"); + message.artifact = $root.google.cloud.deploy.v1.DeployArtifact.fromObject(object.artifact); } - if (object.revision != null) - message.revision = String(object.revision); return message; }; /** - * Creates a plain object from a CloudRunMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeployJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static - * @param {google.cloud.deploy.v1.CloudRunMetadata} message CloudRunMetadata + * @param {google.cloud.deploy.v1.DeployJobRun} message DeployJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudRunMetadata.toObject = function toObject(message, options) { + DeployJobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.serviceUrls = []; if (options.defaults) { - object.service = ""; - object.revision = ""; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.serviceUrls && message.serviceUrls.length) { - object.serviceUrls = []; - for (var j = 0; j < message.serviceUrls.length; ++j) - object.serviceUrls[j] = message.serviceUrls[j]; + object.build = ""; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; + object.metadata = null; + object.artifact = null; } - if (message.revision != null && message.hasOwnProperty("revision")) - object.revision = message.revision; + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.DeployJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.DeployJobRun.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.toObject(message.metadata, options); + if (message.artifact != null && message.hasOwnProperty("artifact")) + object.artifact = $root.google.cloud.deploy.v1.DeployArtifact.toObject(message.artifact, options); return object; }; /** - * Converts this CloudRunMetadata to JSON. + * Converts this DeployJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @instance * @returns {Object.} JSON object */ - CloudRunMetadata.prototype.toJSON = function toJSON() { + DeployJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudRunMetadata + * Gets the default type url for DeployJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CloudRunMetadata + * @memberof google.cloud.deploy.v1.DeployJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudRunMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CloudRunMetadata"; + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJobRun"; }; - return CloudRunMetadata; + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.DeployJobRun.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} MISSING_RESOURCES_FOR_CANARY=4 MISSING_RESOURCES_FOR_CANARY value + * @property {number} CLOUD_BUILD_REQUEST_FAILED=5 CLOUD_BUILD_REQUEST_FAILED value + */ + DeployJobRun.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "MISSING_RESOURCES_FOR_CANARY"] = 4; + values[valuesById[5] = "CLOUD_BUILD_REQUEST_FAILED"] = 5; + return values; + })(); + + return DeployJobRun; })(); - v1.Phase = (function() { + v1.VerifyJobRun = (function() { /** - * Properties of a Phase. + * Properties of a VerifyJobRun. * @memberof google.cloud.deploy.v1 - * @interface IPhase - * @property {string|null} [id] Phase id - * @property {google.cloud.deploy.v1.Phase.State|null} [state] Phase state - * @property {string|null} [skipMessage] Phase skipMessage - * @property {google.cloud.deploy.v1.IDeploymentJobs|null} [deploymentJobs] Phase deploymentJobs - * @property {google.cloud.deploy.v1.IChildRolloutJobs|null} [childRolloutJobs] Phase childRolloutJobs + * @interface IVerifyJobRun + * @property {string|null} [build] VerifyJobRun build + * @property {string|null} [artifactUri] VerifyJobRun artifactUri + * @property {string|null} [eventLogPath] VerifyJobRun eventLogPath + * @property {google.cloud.deploy.v1.VerifyJobRun.FailureCause|null} [failureCause] VerifyJobRun failureCause + * @property {string|null} [failureMessage] VerifyJobRun failureMessage */ /** - * Constructs a new Phase. + * Constructs a new VerifyJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Phase. - * @implements IPhase + * @classdesc Represents a VerifyJobRun. + * @implements IVerifyJobRun * @constructor - * @param {google.cloud.deploy.v1.IPhase=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IVerifyJobRun=} [properties] Properties to set */ - function Phase(properties) { + function VerifyJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19046,145 +29142,131 @@ } /** - * Phase id. - * @member {string} id - * @memberof google.cloud.deploy.v1.Phase - * @instance - */ - Phase.prototype.id = ""; - - /** - * Phase state. - * @member {google.cloud.deploy.v1.Phase.State} state - * @memberof google.cloud.deploy.v1.Phase + * VerifyJobRun build. + * @member {string} build + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - Phase.prototype.state = 0; + VerifyJobRun.prototype.build = ""; /** - * Phase skipMessage. - * @member {string} skipMessage - * @memberof google.cloud.deploy.v1.Phase + * VerifyJobRun artifactUri. + * @member {string} artifactUri + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - Phase.prototype.skipMessage = ""; + VerifyJobRun.prototype.artifactUri = ""; /** - * Phase deploymentJobs. - * @member {google.cloud.deploy.v1.IDeploymentJobs|null|undefined} deploymentJobs - * @memberof google.cloud.deploy.v1.Phase + * VerifyJobRun eventLogPath. + * @member {string} eventLogPath + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - Phase.prototype.deploymentJobs = null; + VerifyJobRun.prototype.eventLogPath = ""; /** - * Phase childRolloutJobs. - * @member {google.cloud.deploy.v1.IChildRolloutJobs|null|undefined} childRolloutJobs - * @memberof google.cloud.deploy.v1.Phase + * VerifyJobRun failureCause. + * @member {google.cloud.deploy.v1.VerifyJobRun.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - Phase.prototype.childRolloutJobs = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + VerifyJobRun.prototype.failureCause = 0; /** - * Phase jobs. - * @member {"deploymentJobs"|"childRolloutJobs"|undefined} jobs - * @memberof google.cloud.deploy.v1.Phase + * VerifyJobRun failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance */ - Object.defineProperty(Phase.prototype, "jobs", { - get: $util.oneOfGetter($oneOfFields = ["deploymentJobs", "childRolloutJobs"]), - set: $util.oneOfSetter($oneOfFields) - }); + VerifyJobRun.prototype.failureMessage = ""; /** - * Creates a new Phase instance using the specified properties. + * Creates a new VerifyJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.IPhase=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Phase} Phase instance + * @param {google.cloud.deploy.v1.IVerifyJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun instance */ - Phase.create = function create(properties) { - return new Phase(properties); + VerifyJobRun.create = function create(properties) { + return new VerifyJobRun(properties); }; /** - * Encodes the specified Phase message. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * Encodes the specified VerifyJobRun message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.IPhase} message Phase message or plain object to encode + * @param {google.cloud.deploy.v1.IVerifyJobRun} message VerifyJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phase.encode = function encode(message, writer) { + VerifyJobRun.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.deploymentJobs != null && Object.hasOwnProperty.call(message, "deploymentJobs")) - $root.google.cloud.deploy.v1.DeploymentJobs.encode(message.deploymentJobs, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.childRolloutJobs != null && Object.hasOwnProperty.call(message, "childRolloutJobs")) - $root.google.cloud.deploy.v1.ChildRolloutJobs.encode(message.childRolloutJobs, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.skipMessage != null && Object.hasOwnProperty.call(message, "skipMessage")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.skipMessage); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactUri); + if (message.eventLogPath != null && Object.hasOwnProperty.call(message, "eventLogPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventLogPath); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.failureMessage); return writer; }; /** - * Encodes the specified Phase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Phase.verify|verify} messages. + * Encodes the specified VerifyJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.IPhase} message Phase message or plain object to encode + * @param {google.cloud.deploy.v1.IVerifyJobRun} message VerifyJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Phase.encodeDelimited = function encodeDelimited(message, writer) { + VerifyJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Phase message from the specified reader or buffer. + * Decodes a VerifyJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Phase} Phase + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Phase.decode = function decode(reader, length) { + VerifyJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Phase(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.VerifyJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.build = reader.string(); break; } - case 3: { - message.state = reader.int32(); + case 2: { + message.artifactUri = reader.string(); break; } - case 6: { - message.skipMessage = reader.string(); + case 3: { + message.eventLogPath = reader.string(); break; } case 4: { - message.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.decode(reader, reader.uint32()); + message.failureCause = reader.int32(); break; } case 5: { - message.childRolloutJobs = $root.google.cloud.deploy.v1.ChildRolloutJobs.decode(reader, reader.uint32()); + message.failureMessage = reader.string(); break; } default: @@ -19196,249 +29278,218 @@ }; /** - * Decodes a Phase message from the specified reader or buffer, length delimited. + * Decodes a VerifyJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Phase} Phase + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Phase.decodeDelimited = function decodeDelimited(reader) { + VerifyJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Phase message. + * Verifies a VerifyJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Phase.verify = function verify(message) { + VerifyJobRun.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + if (message.eventLogPath != null && message.hasOwnProperty("eventLogPath")) + if (!$util.isString(message.eventLogPath)) + return "eventLogPath: string expected"; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { default: - return "state: enum value expected"; + return "failureCause: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: - case 6: break; } - if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) - if (!$util.isString(message.skipMessage)) - return "skipMessage: string expected"; - if (message.deploymentJobs != null && message.hasOwnProperty("deploymentJobs")) { - properties.jobs = 1; - { - var error = $root.google.cloud.deploy.v1.DeploymentJobs.verify(message.deploymentJobs); - if (error) - return "deploymentJobs." + error; - } - } - if (message.childRolloutJobs != null && message.hasOwnProperty("childRolloutJobs")) { - if (properties.jobs === 1) - return "jobs: multiple values"; - properties.jobs = 1; - { - var error = $root.google.cloud.deploy.v1.ChildRolloutJobs.verify(message.childRolloutJobs); - if (error) - return "childRolloutJobs." + error; - } - } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; return null; }; /** - * Creates a Phase message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Phase} Phase + * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun */ - Phase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Phase) + VerifyJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.VerifyJobRun) return object; - var message = new $root.google.cloud.deploy.v1.Phase(); - if (object.id != null) - message.id = String(object.id); - switch (object.state) { + var message = new $root.google.cloud.deploy.v1.VerifyJobRun(); + if (object.build != null) + message.build = String(object.build); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.eventLogPath != null) + message.eventLogPath = String(object.eventLogPath); + switch (object.failureCause) { default: - if (typeof object.state === "number") { - message.state = object.state; + if (typeof object.failureCause === "number") { + message.failureCause = object.failureCause; break; } break; - case "STATE_UNSPECIFIED": + case "FAILURE_CAUSE_UNSPECIFIED": case 0: - message.state = 0; + message.failureCause = 0; break; - case "PENDING": + case "CLOUD_BUILD_UNAVAILABLE": case 1: - message.state = 1; + message.failureCause = 1; break; - case "IN_PROGRESS": + case "EXECUTION_FAILED": case 2: - message.state = 2; + message.failureCause = 2; break; - case "SUCCEEDED": + case "DEADLINE_EXCEEDED": case 3: - message.state = 3; + message.failureCause = 3; break; - case "FAILED": + case "VERIFICATION_CONFIG_NOT_FOUND": case 4: - message.state = 4; + message.failureCause = 4; break; - case "ABORTED": + case "CLOUD_BUILD_REQUEST_FAILED": case 5: - message.state = 5; - break; - case "SKIPPED": - case 6: - message.state = 6; + message.failureCause = 5; break; } - if (object.skipMessage != null) - message.skipMessage = String(object.skipMessage); - if (object.deploymentJobs != null) { - if (typeof object.deploymentJobs !== "object") - throw TypeError(".google.cloud.deploy.v1.Phase.deploymentJobs: object expected"); - message.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.fromObject(object.deploymentJobs); - } - if (object.childRolloutJobs != null) { - if (typeof object.childRolloutJobs !== "object") - throw TypeError(".google.cloud.deploy.v1.Phase.childRolloutJobs: object expected"); - message.childRolloutJobs = $root.google.cloud.deploy.v1.ChildRolloutJobs.fromObject(object.childRolloutJobs); - } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); return message; }; /** - * Creates a plain object from a Phase message. Also converts values to other types if specified. + * Creates a plain object from a VerifyJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static - * @param {google.cloud.deploy.v1.Phase} message Phase + * @param {google.cloud.deploy.v1.VerifyJobRun} message VerifyJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Phase.toObject = function toObject(message, options) { + VerifyJobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.skipMessage = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.deploy.v1.Phase.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.Phase.State[message.state] : message.state; - if (message.deploymentJobs != null && message.hasOwnProperty("deploymentJobs")) { - object.deploymentJobs = $root.google.cloud.deploy.v1.DeploymentJobs.toObject(message.deploymentJobs, options); - if (options.oneofs) - object.jobs = "deploymentJobs"; - } - if (message.childRolloutJobs != null && message.hasOwnProperty("childRolloutJobs")) { - object.childRolloutJobs = $root.google.cloud.deploy.v1.ChildRolloutJobs.toObject(message.childRolloutJobs, options); - if (options.oneofs) - object.jobs = "childRolloutJobs"; + object.build = ""; + object.artifactUri = ""; + object.eventLogPath = ""; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; } - if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) - object.skipMessage = message.skipMessage; + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + object.artifactUri = message.artifactUri; + if (message.eventLogPath != null && message.hasOwnProperty("eventLogPath")) + object.eventLogPath = message.eventLogPath; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.VerifyJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.VerifyJobRun.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; return object; }; /** - * Converts this Phase to JSON. + * Converts this VerifyJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @instance * @returns {Object.} JSON object */ - Phase.prototype.toJSON = function toJSON() { + VerifyJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Phase + * Gets the default type url for VerifyJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Phase + * @memberof google.cloud.deploy.v1.VerifyJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Phase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerifyJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Phase"; + return typeUrlPrefix + "/google.cloud.deploy.v1.VerifyJobRun"; }; /** - * State enum. - * @name google.cloud.deploy.v1.Phase.State + * FailureCause enum. + * @name google.cloud.deploy.v1.VerifyJobRun.FailureCause * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} IN_PROGRESS=2 IN_PROGRESS value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - * @property {number} ABORTED=5 ABORTED value - * @property {number} SKIPPED=6 SKIPPED value + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} VERIFICATION_CONFIG_NOT_FOUND=4 VERIFICATION_CONFIG_NOT_FOUND value + * @property {number} CLOUD_BUILD_REQUEST_FAILED=5 CLOUD_BUILD_REQUEST_FAILED value */ - Phase.State = (function() { + VerifyJobRun.FailureCause = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "IN_PROGRESS"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "ABORTED"] = 5; - values[valuesById[6] = "SKIPPED"] = 6; + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "VERIFICATION_CONFIG_NOT_FOUND"] = 4; + values[valuesById[5] = "CLOUD_BUILD_REQUEST_FAILED"] = 5; return values; })(); - return Phase; + return VerifyJobRun; })(); - v1.DeploymentJobs = (function() { + v1.PredeployJobRun = (function() { /** - * Properties of a DeploymentJobs. + * Properties of a PredeployJobRun. * @memberof google.cloud.deploy.v1 - * @interface IDeploymentJobs - * @property {google.cloud.deploy.v1.IJob|null} [deployJob] DeploymentJobs deployJob - * @property {google.cloud.deploy.v1.IJob|null} [verifyJob] DeploymentJobs verifyJob - * @property {google.cloud.deploy.v1.IJob|null} [predeployJob] DeploymentJobs predeployJob - * @property {google.cloud.deploy.v1.IJob|null} [postdeployJob] DeploymentJobs postdeployJob + * @interface IPredeployJobRun + * @property {string|null} [build] PredeployJobRun build + * @property {google.cloud.deploy.v1.PredeployJobRun.FailureCause|null} [failureCause] PredeployJobRun failureCause + * @property {string|null} [failureMessage] PredeployJobRun failureMessage */ /** - * Constructs a new DeploymentJobs. + * Constructs a new PredeployJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeploymentJobs. - * @implements IDeploymentJobs + * @classdesc Represents a PredeployJobRun. + * @implements IPredeployJobRun * @constructor - * @param {google.cloud.deploy.v1.IDeploymentJobs=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPredeployJobRun=} [properties] Properties to set */ - function DeploymentJobs(properties) { + function PredeployJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19446,117 +29497,103 @@ } /** - * DeploymentJobs deployJob. - * @member {google.cloud.deploy.v1.IJob|null|undefined} deployJob - * @memberof google.cloud.deploy.v1.DeploymentJobs - * @instance - */ - DeploymentJobs.prototype.deployJob = null; - - /** - * DeploymentJobs verifyJob. - * @member {google.cloud.deploy.v1.IJob|null|undefined} verifyJob - * @memberof google.cloud.deploy.v1.DeploymentJobs + * PredeployJobRun build. + * @member {string} build + * @memberof google.cloud.deploy.v1.PredeployJobRun * @instance */ - DeploymentJobs.prototype.verifyJob = null; + PredeployJobRun.prototype.build = ""; /** - * DeploymentJobs predeployJob. - * @member {google.cloud.deploy.v1.IJob|null|undefined} predeployJob - * @memberof google.cloud.deploy.v1.DeploymentJobs + * PredeployJobRun failureCause. + * @member {google.cloud.deploy.v1.PredeployJobRun.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.PredeployJobRun * @instance */ - DeploymentJobs.prototype.predeployJob = null; + PredeployJobRun.prototype.failureCause = 0; /** - * DeploymentJobs postdeployJob. - * @member {google.cloud.deploy.v1.IJob|null|undefined} postdeployJob - * @memberof google.cloud.deploy.v1.DeploymentJobs + * PredeployJobRun failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.PredeployJobRun * @instance */ - DeploymentJobs.prototype.postdeployJob = null; + PredeployJobRun.prototype.failureMessage = ""; /** - * Creates a new DeploymentJobs instance using the specified properties. + * Creates a new PredeployJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static - * @param {google.cloud.deploy.v1.IDeploymentJobs=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs instance + * @param {google.cloud.deploy.v1.IPredeployJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun instance */ - DeploymentJobs.create = function create(properties) { - return new DeploymentJobs(properties); + PredeployJobRun.create = function create(properties) { + return new PredeployJobRun(properties); }; /** - * Encodes the specified DeploymentJobs message. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * Encodes the specified PredeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.PredeployJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static - * @param {google.cloud.deploy.v1.IDeploymentJobs} message DeploymentJobs message or plain object to encode + * @param {google.cloud.deploy.v1.IPredeployJobRun} message PredeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentJobs.encode = function encode(message, writer) { + PredeployJobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deployJob != null && Object.hasOwnProperty.call(message, "deployJob")) - $root.google.cloud.deploy.v1.Job.encode(message.deployJob, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.verifyJob != null && Object.hasOwnProperty.call(message, "verifyJob")) - $root.google.cloud.deploy.v1.Job.encode(message.verifyJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.predeployJob != null && Object.hasOwnProperty.call(message, "predeployJob")) - $root.google.cloud.deploy.v1.Job.encode(message.predeployJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.postdeployJob != null && Object.hasOwnProperty.call(message, "postdeployJob")) - $root.google.cloud.deploy.v1.Job.encode(message.postdeployJob, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); return writer; }; /** - * Encodes the specified DeploymentJobs message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeploymentJobs.verify|verify} messages. + * Encodes the specified PredeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PredeployJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static - * @param {google.cloud.deploy.v1.IDeploymentJobs} message DeploymentJobs message or plain object to encode + * @param {google.cloud.deploy.v1.IPredeployJobRun} message PredeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeploymentJobs.encodeDelimited = function encodeDelimited(message, writer) { + PredeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeploymentJobs message from the specified reader or buffer. + * Decodes a PredeployJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeploymentJobs.decode = function decode(reader, length) { + PredeployJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeploymentJobs(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PredeployJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.deployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + message.build = reader.string(); break; } case 2: { - message.verifyJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + message.failureCause = reader.int32(); break; } case 3: { - message.predeployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); - break; - } - case 4: { - message.postdeployJob = $root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32()); + message.failureMessage = reader.string(); break; } default: @@ -19568,170 +29605,195 @@ }; /** - * Decodes a DeploymentJobs message from the specified reader or buffer, length delimited. + * Decodes a PredeployJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeploymentJobs.decodeDelimited = function decodeDelimited(reader) { + PredeployJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeploymentJobs message. + * Verifies a PredeployJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeploymentJobs.verify = function verify(message) { + PredeployJobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deployJob != null && message.hasOwnProperty("deployJob")) { - var error = $root.google.cloud.deploy.v1.Job.verify(message.deployJob); - if (error) - return "deployJob." + error; - } - if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { - var error = $root.google.cloud.deploy.v1.Job.verify(message.verifyJob); - if (error) - return "verifyJob." + error; - } - if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) { - var error = $root.google.cloud.deploy.v1.Job.verify(message.predeployJob); - if (error) - return "predeployJob." + error; - } - if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) { - var error = $root.google.cloud.deploy.v1.Job.verify(message.postdeployJob); - if (error) - return "postdeployJob." + error; - } + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; return null; }; /** - * Creates a DeploymentJobs message from a plain object. Also converts values to their respective internal types. + * Creates a PredeployJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeploymentJobs} DeploymentJobs + * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun */ - DeploymentJobs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeploymentJobs) + PredeployJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PredeployJobRun) return object; - var message = new $root.google.cloud.deploy.v1.DeploymentJobs(); - if (object.deployJob != null) { - if (typeof object.deployJob !== "object") - throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.deployJob: object expected"); - message.deployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.deployJob); - } - if (object.verifyJob != null) { - if (typeof object.verifyJob !== "object") - throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.verifyJob: object expected"); - message.verifyJob = $root.google.cloud.deploy.v1.Job.fromObject(object.verifyJob); - } - if (object.predeployJob != null) { - if (typeof object.predeployJob !== "object") - throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.predeployJob: object expected"); - message.predeployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.predeployJob); - } - if (object.postdeployJob != null) { - if (typeof object.postdeployJob !== "object") - throw TypeError(".google.cloud.deploy.v1.DeploymentJobs.postdeployJob: object expected"); - message.postdeployJob = $root.google.cloud.deploy.v1.Job.fromObject(object.postdeployJob); + var message = new $root.google.cloud.deploy.v1.PredeployJobRun(); + if (object.build != null) + message.build = String(object.build); + switch (object.failureCause) { + default: + if (typeof object.failureCause === "number") { + message.failureCause = object.failureCause; + break; + } + break; + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.failureCause = 3; + break; + case "CLOUD_BUILD_REQUEST_FAILED": + case 4: + message.failureCause = 4; + break; } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); return message; }; /** - * Creates a plain object from a DeploymentJobs message. Also converts values to other types if specified. + * Creates a plain object from a PredeployJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static - * @param {google.cloud.deploy.v1.DeploymentJobs} message DeploymentJobs + * @param {google.cloud.deploy.v1.PredeployJobRun} message PredeployJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeploymentJobs.toObject = function toObject(message, options) { + PredeployJobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.deployJob = null; - object.verifyJob = null; - object.predeployJob = null; - object.postdeployJob = null; + object.build = ""; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; } - if (message.deployJob != null && message.hasOwnProperty("deployJob")) - object.deployJob = $root.google.cloud.deploy.v1.Job.toObject(message.deployJob, options); - if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) - object.verifyJob = $root.google.cloud.deploy.v1.Job.toObject(message.verifyJob, options); - if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) - object.predeployJob = $root.google.cloud.deploy.v1.Job.toObject(message.predeployJob, options); - if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) - object.postdeployJob = $root.google.cloud.deploy.v1.Job.toObject(message.postdeployJob, options); + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.PredeployJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.PredeployJobRun.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; return object; }; /** - * Converts this DeploymentJobs to JSON. + * Converts this PredeployJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @instance * @returns {Object.} JSON object */ - DeploymentJobs.prototype.toJSON = function toJSON() { + PredeployJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeploymentJobs + * Gets the default type url for PredeployJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeploymentJobs + * @memberof google.cloud.deploy.v1.PredeployJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeploymentJobs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PredeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeploymentJobs"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PredeployJobRun"; }; - return DeploymentJobs; + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.PredeployJobRun.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} CLOUD_BUILD_REQUEST_FAILED=4 CLOUD_BUILD_REQUEST_FAILED value + */ + PredeployJobRun.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "CLOUD_BUILD_REQUEST_FAILED"] = 4; + return values; + })(); + + return PredeployJobRun; })(); - v1.ChildRolloutJobs = (function() { + v1.PostdeployJobRun = (function() { /** - * Properties of a ChildRolloutJobs. + * Properties of a PostdeployJobRun. * @memberof google.cloud.deploy.v1 - * @interface IChildRolloutJobs - * @property {Array.|null} [createRolloutJobs] ChildRolloutJobs createRolloutJobs - * @property {Array.|null} [advanceRolloutJobs] ChildRolloutJobs advanceRolloutJobs + * @interface IPostdeployJobRun + * @property {string|null} [build] PostdeployJobRun build + * @property {google.cloud.deploy.v1.PostdeployJobRun.FailureCause|null} [failureCause] PostdeployJobRun failureCause + * @property {string|null} [failureMessage] PostdeployJobRun failureMessage */ /** - * Constructs a new ChildRolloutJobs. + * Constructs a new PostdeployJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ChildRolloutJobs. - * @implements IChildRolloutJobs + * @classdesc Represents a PostdeployJobRun. + * @implements IPostdeployJobRun * @constructor - * @param {google.cloud.deploy.v1.IChildRolloutJobs=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPostdeployJobRun=} [properties] Properties to set */ - function ChildRolloutJobs(properties) { - this.createRolloutJobs = []; - this.advanceRolloutJobs = []; + function PostdeployJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19739,95 +29801,103 @@ } /** - * ChildRolloutJobs createRolloutJobs. - * @member {Array.} createRolloutJobs - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * PostdeployJobRun build. + * @member {string} build + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @instance */ - ChildRolloutJobs.prototype.createRolloutJobs = $util.emptyArray; + PostdeployJobRun.prototype.build = ""; /** - * ChildRolloutJobs advanceRolloutJobs. - * @member {Array.} advanceRolloutJobs - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * PostdeployJobRun failureCause. + * @member {google.cloud.deploy.v1.PostdeployJobRun.FailureCause} failureCause + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @instance */ - ChildRolloutJobs.prototype.advanceRolloutJobs = $util.emptyArray; + PostdeployJobRun.prototype.failureCause = 0; /** - * Creates a new ChildRolloutJobs instance using the specified properties. + * PostdeployJobRun failureMessage. + * @member {string} failureMessage + * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @instance + */ + PostdeployJobRun.prototype.failureMessage = ""; + + /** + * Creates a new PostdeployJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static - * @param {google.cloud.deploy.v1.IChildRolloutJobs=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs instance + * @param {google.cloud.deploy.v1.IPostdeployJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun instance */ - ChildRolloutJobs.create = function create(properties) { - return new ChildRolloutJobs(properties); + PostdeployJobRun.create = function create(properties) { + return new PostdeployJobRun(properties); }; /** - * Encodes the specified ChildRolloutJobs message. Does not implicitly {@link google.cloud.deploy.v1.ChildRolloutJobs.verify|verify} messages. + * Encodes the specified PostdeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static - * @param {google.cloud.deploy.v1.IChildRolloutJobs} message ChildRolloutJobs message or plain object to encode + * @param {google.cloud.deploy.v1.IPostdeployJobRun} message PostdeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChildRolloutJobs.encode = function encode(message, writer) { + PostdeployJobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createRolloutJobs != null && message.createRolloutJobs.length) - for (var i = 0; i < message.createRolloutJobs.length; ++i) - $root.google.cloud.deploy.v1.Job.encode(message.createRolloutJobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.advanceRolloutJobs != null && message.advanceRolloutJobs.length) - for (var i = 0; i < message.advanceRolloutJobs.length; ++i) - $root.google.cloud.deploy.v1.Job.encode(message.advanceRolloutJobs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); + if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); + if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); return writer; }; /** - * Encodes the specified ChildRolloutJobs message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ChildRolloutJobs.verify|verify} messages. + * Encodes the specified PostdeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static - * @param {google.cloud.deploy.v1.IChildRolloutJobs} message ChildRolloutJobs message or plain object to encode + * @param {google.cloud.deploy.v1.IPostdeployJobRun} message PostdeployJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChildRolloutJobs.encodeDelimited = function encodeDelimited(message, writer) { + PostdeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChildRolloutJobs message from the specified reader or buffer. + * Decodes a PostdeployJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs + * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChildRolloutJobs.decode = function decode(reader, length) { + PostdeployJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ChildRolloutJobs(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PostdeployJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.createRolloutJobs && message.createRolloutJobs.length)) - message.createRolloutJobs = []; - message.createRolloutJobs.push($root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32())); + message.build = reader.string(); break; } case 2: { - if (!(message.advanceRolloutJobs && message.advanceRolloutJobs.length)) - message.advanceRolloutJobs = []; - message.advanceRolloutJobs.push($root.google.cloud.deploy.v1.Job.decode(reader, reader.uint32())); + message.failureCause = reader.int32(); + break; + } + case 3: { + message.failureMessage = reader.string(); break; } default: @@ -19839,174 +29909,194 @@ }; /** - * Decodes a ChildRolloutJobs message from the specified reader or buffer, length delimited. + * Decodes a PostdeployJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs + * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChildRolloutJobs.decodeDelimited = function decodeDelimited(reader) { + PostdeployJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChildRolloutJobs message. + * Verifies a PostdeployJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChildRolloutJobs.verify = function verify(message) { + PostdeployJobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createRolloutJobs != null && message.hasOwnProperty("createRolloutJobs")) { - if (!Array.isArray(message.createRolloutJobs)) - return "createRolloutJobs: array expected"; - for (var i = 0; i < message.createRolloutJobs.length; ++i) { - var error = $root.google.cloud.deploy.v1.Job.verify(message.createRolloutJobs[i]); - if (error) - return "createRolloutJobs." + error; - } - } - if (message.advanceRolloutJobs != null && message.hasOwnProperty("advanceRolloutJobs")) { - if (!Array.isArray(message.advanceRolloutJobs)) - return "advanceRolloutJobs: array expected"; - for (var i = 0; i < message.advanceRolloutJobs.length; ++i) { - var error = $root.google.cloud.deploy.v1.Job.verify(message.advanceRolloutJobs[i]); - if (error) - return "advanceRolloutJobs." + error; + if (message.build != null && message.hasOwnProperty("build")) + if (!$util.isString(message.build)) + return "build: string expected"; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + switch (message.failureCause) { + default: + return "failureCause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - } + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + if (!$util.isString(message.failureMessage)) + return "failureMessage: string expected"; return null; }; /** - * Creates a ChildRolloutJobs message from a plain object. Also converts values to their respective internal types. + * Creates a PostdeployJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ChildRolloutJobs} ChildRolloutJobs + * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun */ - ChildRolloutJobs.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ChildRolloutJobs) + PostdeployJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PostdeployJobRun) return object; - var message = new $root.google.cloud.deploy.v1.ChildRolloutJobs(); - if (object.createRolloutJobs) { - if (!Array.isArray(object.createRolloutJobs)) - throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.createRolloutJobs: array expected"); - message.createRolloutJobs = []; - for (var i = 0; i < object.createRolloutJobs.length; ++i) { - if (typeof object.createRolloutJobs[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.createRolloutJobs: object expected"); - message.createRolloutJobs[i] = $root.google.cloud.deploy.v1.Job.fromObject(object.createRolloutJobs[i]); - } - } - if (object.advanceRolloutJobs) { - if (!Array.isArray(object.advanceRolloutJobs)) - throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.advanceRolloutJobs: array expected"); - message.advanceRolloutJobs = []; - for (var i = 0; i < object.advanceRolloutJobs.length; ++i) { - if (typeof object.advanceRolloutJobs[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ChildRolloutJobs.advanceRolloutJobs: object expected"); - message.advanceRolloutJobs[i] = $root.google.cloud.deploy.v1.Job.fromObject(object.advanceRolloutJobs[i]); + var message = new $root.google.cloud.deploy.v1.PostdeployJobRun(); + if (object.build != null) + message.build = String(object.build); + switch (object.failureCause) { + default: + if (typeof object.failureCause === "number") { + message.failureCause = object.failureCause; + break; } + break; + case "FAILURE_CAUSE_UNSPECIFIED": + case 0: + message.failureCause = 0; + break; + case "CLOUD_BUILD_UNAVAILABLE": + case 1: + message.failureCause = 1; + break; + case "EXECUTION_FAILED": + case 2: + message.failureCause = 2; + break; + case "DEADLINE_EXCEEDED": + case 3: + message.failureCause = 3; + break; + case "CLOUD_BUILD_REQUEST_FAILED": + case 4: + message.failureCause = 4; + break; } + if (object.failureMessage != null) + message.failureMessage = String(object.failureMessage); return message; }; /** - * Creates a plain object from a ChildRolloutJobs message. Also converts values to other types if specified. + * Creates a plain object from a PostdeployJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static - * @param {google.cloud.deploy.v1.ChildRolloutJobs} message ChildRolloutJobs + * @param {google.cloud.deploy.v1.PostdeployJobRun} message PostdeployJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChildRolloutJobs.toObject = function toObject(message, options) { + PostdeployJobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.createRolloutJobs = []; - object.advanceRolloutJobs = []; - } - if (message.createRolloutJobs && message.createRolloutJobs.length) { - object.createRolloutJobs = []; - for (var j = 0; j < message.createRolloutJobs.length; ++j) - object.createRolloutJobs[j] = $root.google.cloud.deploy.v1.Job.toObject(message.createRolloutJobs[j], options); - } - if (message.advanceRolloutJobs && message.advanceRolloutJobs.length) { - object.advanceRolloutJobs = []; - for (var j = 0; j < message.advanceRolloutJobs.length; ++j) - object.advanceRolloutJobs[j] = $root.google.cloud.deploy.v1.Job.toObject(message.advanceRolloutJobs[j], options); + if (options.defaults) { + object.build = ""; + object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; + object.failureMessage = ""; } + if (message.build != null && message.hasOwnProperty("build")) + object.build = message.build; + if (message.failureCause != null && message.hasOwnProperty("failureCause")) + object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.PostdeployJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.PostdeployJobRun.FailureCause[message.failureCause] : message.failureCause; + if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) + object.failureMessage = message.failureMessage; return object; }; /** - * Converts this ChildRolloutJobs to JSON. + * Converts this PostdeployJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @instance * @returns {Object.} JSON object */ - ChildRolloutJobs.prototype.toJSON = function toJSON() { + PostdeployJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChildRolloutJobs + * Gets the default type url for PostdeployJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ChildRolloutJobs + * @memberof google.cloud.deploy.v1.PostdeployJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChildRolloutJobs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostdeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ChildRolloutJobs"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PostdeployJobRun"; }; - return ChildRolloutJobs; + /** + * FailureCause enum. + * @name google.cloud.deploy.v1.PostdeployJobRun.FailureCause + * @enum {number} + * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value + * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value + * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value + * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value + * @property {number} CLOUD_BUILD_REQUEST_FAILED=4 CLOUD_BUILD_REQUEST_FAILED value + */ + PostdeployJobRun.FailureCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; + values[valuesById[2] = "EXECUTION_FAILED"] = 2; + values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; + values[valuesById[4] = "CLOUD_BUILD_REQUEST_FAILED"] = 4; + return values; + })(); + + return PostdeployJobRun; })(); - v1.Job = (function() { + v1.CreateChildRolloutJobRun = (function() { /** - * Properties of a Job. + * Properties of a CreateChildRolloutJobRun. * @memberof google.cloud.deploy.v1 - * @interface IJob - * @property {string|null} [id] Job id - * @property {google.cloud.deploy.v1.Job.State|null} [state] Job state - * @property {string|null} [skipMessage] Job skipMessage - * @property {string|null} [jobRun] Job jobRun - * @property {google.cloud.deploy.v1.IDeployJob|null} [deployJob] Job deployJob - * @property {google.cloud.deploy.v1.IVerifyJob|null} [verifyJob] Job verifyJob - * @property {google.cloud.deploy.v1.IPredeployJob|null} [predeployJob] Job predeployJob - * @property {google.cloud.deploy.v1.IPostdeployJob|null} [postdeployJob] Job postdeployJob - * @property {google.cloud.deploy.v1.ICreateChildRolloutJob|null} [createChildRolloutJob] Job createChildRolloutJob - * @property {google.cloud.deploy.v1.IAdvanceChildRolloutJob|null} [advanceChildRolloutJob] Job advanceChildRolloutJob + * @interface ICreateChildRolloutJobRun + * @property {string|null} [rollout] CreateChildRolloutJobRun rollout + * @property {string|null} [rolloutPhaseId] CreateChildRolloutJobRun rolloutPhaseId */ /** - * Constructs a new Job. + * Constructs a new CreateChildRolloutJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Job. - * @implements IJob + * @classdesc Represents a CreateChildRolloutJobRun. + * @implements ICreateChildRolloutJobRun * @constructor - * @param {google.cloud.deploy.v1.IJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun=} [properties] Properties to set */ - function Job(properties) { + function CreateChildRolloutJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20014,215 +30104,89 @@ } /** - * Job id. - * @member {string} id - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.id = ""; - - /** - * Job state. - * @member {google.cloud.deploy.v1.Job.State} state - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.state = 0; - - /** - * Job skipMessage. - * @member {string} skipMessage - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.skipMessage = ""; - - /** - * Job jobRun. - * @member {string} jobRun - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.jobRun = ""; - - /** - * Job deployJob. - * @member {google.cloud.deploy.v1.IDeployJob|null|undefined} deployJob - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.deployJob = null; - - /** - * Job verifyJob. - * @member {google.cloud.deploy.v1.IVerifyJob|null|undefined} verifyJob - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.verifyJob = null; - - /** - * Job predeployJob. - * @member {google.cloud.deploy.v1.IPredeployJob|null|undefined} predeployJob - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.predeployJob = null; - - /** - * Job postdeployJob. - * @member {google.cloud.deploy.v1.IPostdeployJob|null|undefined} postdeployJob - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.postdeployJob = null; - - /** - * Job createChildRolloutJob. - * @member {google.cloud.deploy.v1.ICreateChildRolloutJob|null|undefined} createChildRolloutJob - * @memberof google.cloud.deploy.v1.Job - * @instance - */ - Job.prototype.createChildRolloutJob = null; - - /** - * Job advanceChildRolloutJob. - * @member {google.cloud.deploy.v1.IAdvanceChildRolloutJob|null|undefined} advanceChildRolloutJob - * @memberof google.cloud.deploy.v1.Job + * CreateChildRolloutJobRun rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @instance */ - Job.prototype.advanceChildRolloutJob = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CreateChildRolloutJobRun.prototype.rollout = ""; /** - * Job jobType. - * @member {"deployJob"|"verifyJob"|"predeployJob"|"postdeployJob"|"createChildRolloutJob"|"advanceChildRolloutJob"|undefined} jobType - * @memberof google.cloud.deploy.v1.Job + * CreateChildRolloutJobRun rolloutPhaseId. + * @member {string} rolloutPhaseId + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @instance */ - Object.defineProperty(Job.prototype, "jobType", { - get: $util.oneOfGetter($oneOfFields = ["deployJob", "verifyJob", "predeployJob", "postdeployJob", "createChildRolloutJob", "advanceChildRolloutJob"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateChildRolloutJobRun.prototype.rolloutPhaseId = ""; /** - * Creates a new Job instance using the specified properties. + * Creates a new CreateChildRolloutJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.IJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Job} Job instance + * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun instance */ - Job.create = function create(properties) { - return new Job(properties); + CreateChildRolloutJobRun.create = function create(properties) { + return new CreateChildRolloutJobRun(properties); }; /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * Encodes the specified CreateChildRolloutJobRun message. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.IJob} message Job message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun} message CreateChildRolloutJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Job.encode = function encode(message, writer) { + CreateChildRolloutJobRun.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.jobRun != null && Object.hasOwnProperty.call(message, "jobRun")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobRun); - if (message.deployJob != null && Object.hasOwnProperty.call(message, "deployJob")) - $root.google.cloud.deploy.v1.DeployJob.encode(message.deployJob, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.verifyJob != null && Object.hasOwnProperty.call(message, "verifyJob")) - $root.google.cloud.deploy.v1.VerifyJob.encode(message.verifyJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.createChildRolloutJob != null && Object.hasOwnProperty.call(message, "createChildRolloutJob")) - $root.google.cloud.deploy.v1.CreateChildRolloutJob.encode(message.createChildRolloutJob, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.advanceChildRolloutJob != null && Object.hasOwnProperty.call(message, "advanceChildRolloutJob")) - $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.encode(message.advanceChildRolloutJob, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.skipMessage != null && Object.hasOwnProperty.call(message, "skipMessage")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.skipMessage); - if (message.predeployJob != null && Object.hasOwnProperty.call(message, "predeployJob")) - $root.google.cloud.deploy.v1.PredeployJob.encode(message.predeployJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.postdeployJob != null && Object.hasOwnProperty.call(message, "postdeployJob")) - $root.google.cloud.deploy.v1.PostdeployJob.encode(message.postdeployJob, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); + if (message.rolloutPhaseId != null && Object.hasOwnProperty.call(message, "rolloutPhaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutPhaseId); return writer; }; /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Job.verify|verify} messages. + * Encodes the specified CreateChildRolloutJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.IJob} message Job message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun} message CreateChildRolloutJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Job.encodeDelimited = function encodeDelimited(message, writer) { + CreateChildRolloutJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Job message from the specified reader or buffer. + * Decodes a CreateChildRolloutJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Job} Job + * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.decode = function decode(reader, length) { + CreateChildRolloutJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Job(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateChildRolloutJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.rollout = reader.string(); break; } case 2: { - message.state = reader.int32(); - break; - } - case 8: { - message.skipMessage = reader.string(); - break; - } - case 3: { - message.jobRun = reader.string(); - break; - } - case 4: { - message.deployJob = $root.google.cloud.deploy.v1.DeployJob.decode(reader, reader.uint32()); - break; - } - case 5: { - message.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.decode(reader, reader.uint32()); - break; - } - case 9: { - message.predeployJob = $root.google.cloud.deploy.v1.PredeployJob.decode(reader, reader.uint32()); - break; - } - case 10: { - message.postdeployJob = $root.google.cloud.deploy.v1.PostdeployJob.decode(reader, reader.uint32()); - break; - } - case 6: { - message.createChildRolloutJob = $root.google.cloud.deploy.v1.CreateChildRolloutJob.decode(reader, reader.uint32()); - break; - } - case 7: { - message.advanceChildRolloutJob = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.decode(reader, reader.uint32()); + message.rolloutPhaseId = reader.string(); break; } default: @@ -20234,347 +30198,132 @@ }; /** - * Decodes a Job message from the specified reader or buffer, length delimited. + * Decodes a CreateChildRolloutJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Job} Job + * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.decodeDelimited = function decodeDelimited(reader) { + CreateChildRolloutJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Job message. + * Verifies a CreateChildRolloutJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Job.verify = function verify(message) { + CreateChildRolloutJobRun.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) - if (!$util.isString(message.skipMessage)) - return "skipMessage: string expected"; - if (message.jobRun != null && message.hasOwnProperty("jobRun")) - if (!$util.isString(message.jobRun)) - return "jobRun: string expected"; - if (message.deployJob != null && message.hasOwnProperty("deployJob")) { - properties.jobType = 1; - { - var error = $root.google.cloud.deploy.v1.DeployJob.verify(message.deployJob); - if (error) - return "deployJob." + error; - } - } - if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { - if (properties.jobType === 1) - return "jobType: multiple values"; - properties.jobType = 1; - { - var error = $root.google.cloud.deploy.v1.VerifyJob.verify(message.verifyJob); - if (error) - return "verifyJob." + error; - } - } - if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) { - if (properties.jobType === 1) - return "jobType: multiple values"; - properties.jobType = 1; - { - var error = $root.google.cloud.deploy.v1.PredeployJob.verify(message.predeployJob); - if (error) - return "predeployJob." + error; - } - } - if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) { - if (properties.jobType === 1) - return "jobType: multiple values"; - properties.jobType = 1; - { - var error = $root.google.cloud.deploy.v1.PostdeployJob.verify(message.postdeployJob); - if (error) - return "postdeployJob." + error; - } - } - if (message.createChildRolloutJob != null && message.hasOwnProperty("createChildRolloutJob")) { - if (properties.jobType === 1) - return "jobType: multiple values"; - properties.jobType = 1; - { - var error = $root.google.cloud.deploy.v1.CreateChildRolloutJob.verify(message.createChildRolloutJob); - if (error) - return "createChildRolloutJob." + error; - } - } - if (message.advanceChildRolloutJob != null && message.hasOwnProperty("advanceChildRolloutJob")) { - if (properties.jobType === 1) - return "jobType: multiple values"; - properties.jobType = 1; - { - var error = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.verify(message.advanceChildRolloutJob); - if (error) - return "advanceChildRolloutJob." + error; - } - } + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) + if (!$util.isString(message.rolloutPhaseId)) + return "rolloutPhaseId: string expected"; return null; }; /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. + * Creates a CreateChildRolloutJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Job} Job + * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun */ - Job.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Job) + CreateChildRolloutJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateChildRolloutJobRun) return object; - var message = new $root.google.cloud.deploy.v1.Job(); - if (object.id != null) - message.id = String(object.id); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "DISABLED": - case 2: - message.state = 2; - break; - case "IN_PROGRESS": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "ABORTED": - case 6: - message.state = 6; - break; - case "SKIPPED": - case 7: - message.state = 7; - break; - case "IGNORED": - case 8: - message.state = 8; - break; - } - if (object.skipMessage != null) - message.skipMessage = String(object.skipMessage); - if (object.jobRun != null) - message.jobRun = String(object.jobRun); - if (object.deployJob != null) { - if (typeof object.deployJob !== "object") - throw TypeError(".google.cloud.deploy.v1.Job.deployJob: object expected"); - message.deployJob = $root.google.cloud.deploy.v1.DeployJob.fromObject(object.deployJob); - } - if (object.verifyJob != null) { - if (typeof object.verifyJob !== "object") - throw TypeError(".google.cloud.deploy.v1.Job.verifyJob: object expected"); - message.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.fromObject(object.verifyJob); - } - if (object.predeployJob != null) { - if (typeof object.predeployJob !== "object") - throw TypeError(".google.cloud.deploy.v1.Job.predeployJob: object expected"); - message.predeployJob = $root.google.cloud.deploy.v1.PredeployJob.fromObject(object.predeployJob); - } - if (object.postdeployJob != null) { - if (typeof object.postdeployJob !== "object") - throw TypeError(".google.cloud.deploy.v1.Job.postdeployJob: object expected"); - message.postdeployJob = $root.google.cloud.deploy.v1.PostdeployJob.fromObject(object.postdeployJob); - } - if (object.createChildRolloutJob != null) { - if (typeof object.createChildRolloutJob !== "object") - throw TypeError(".google.cloud.deploy.v1.Job.createChildRolloutJob: object expected"); - message.createChildRolloutJob = $root.google.cloud.deploy.v1.CreateChildRolloutJob.fromObject(object.createChildRolloutJob); - } - if (object.advanceChildRolloutJob != null) { - if (typeof object.advanceChildRolloutJob !== "object") - throw TypeError(".google.cloud.deploy.v1.Job.advanceChildRolloutJob: object expected"); - message.advanceChildRolloutJob = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.fromObject(object.advanceChildRolloutJob); - } + var message = new $root.google.cloud.deploy.v1.CreateChildRolloutJobRun(); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.rolloutPhaseId != null) + message.rolloutPhaseId = String(object.rolloutPhaseId); return message; }; /** - * Creates a plain object from a Job message. Also converts values to other types if specified. + * Creates a plain object from a CreateChildRolloutJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.Job} message Job + * @param {google.cloud.deploy.v1.CreateChildRolloutJobRun} message CreateChildRolloutJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Job.toObject = function toObject(message, options) { + CreateChildRolloutJobRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.id = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.jobRun = ""; - object.skipMessage = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.deploy.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.Job.State[message.state] : message.state; - if (message.jobRun != null && message.hasOwnProperty("jobRun")) - object.jobRun = message.jobRun; - if (message.deployJob != null && message.hasOwnProperty("deployJob")) { - object.deployJob = $root.google.cloud.deploy.v1.DeployJob.toObject(message.deployJob, options); - if (options.oneofs) - object.jobType = "deployJob"; - } - if (message.verifyJob != null && message.hasOwnProperty("verifyJob")) { - object.verifyJob = $root.google.cloud.deploy.v1.VerifyJob.toObject(message.verifyJob, options); - if (options.oneofs) - object.jobType = "verifyJob"; - } - if (message.createChildRolloutJob != null && message.hasOwnProperty("createChildRolloutJob")) { - object.createChildRolloutJob = $root.google.cloud.deploy.v1.CreateChildRolloutJob.toObject(message.createChildRolloutJob, options); - if (options.oneofs) - object.jobType = "createChildRolloutJob"; - } - if (message.advanceChildRolloutJob != null && message.hasOwnProperty("advanceChildRolloutJob")) { - object.advanceChildRolloutJob = $root.google.cloud.deploy.v1.AdvanceChildRolloutJob.toObject(message.advanceChildRolloutJob, options); - if (options.oneofs) - object.jobType = "advanceChildRolloutJob"; - } - if (message.skipMessage != null && message.hasOwnProperty("skipMessage")) - object.skipMessage = message.skipMessage; - if (message.predeployJob != null && message.hasOwnProperty("predeployJob")) { - object.predeployJob = $root.google.cloud.deploy.v1.PredeployJob.toObject(message.predeployJob, options); - if (options.oneofs) - object.jobType = "predeployJob"; - } - if (message.postdeployJob != null && message.hasOwnProperty("postdeployJob")) { - object.postdeployJob = $root.google.cloud.deploy.v1.PostdeployJob.toObject(message.postdeployJob, options); - if (options.oneofs) - object.jobType = "postdeployJob"; + object.rollout = ""; + object.rolloutPhaseId = ""; } + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) + object.rolloutPhaseId = message.rolloutPhaseId; return object; }; /** - * Converts this Job to JSON. + * Converts this CreateChildRolloutJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @instance * @returns {Object.} JSON object */ - Job.prototype.toJSON = function toJSON() { + CreateChildRolloutJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Job + * Gets the default type url for CreateChildRolloutJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Job + * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateChildRolloutJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Job"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateChildRolloutJobRun"; }; - /** - * State enum. - * @name google.cloud.deploy.v1.Job.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} DISABLED=2 DISABLED value - * @property {number} IN_PROGRESS=3 IN_PROGRESS value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - * @property {number} ABORTED=6 ABORTED value - * @property {number} SKIPPED=7 SKIPPED value - * @property {number} IGNORED=8 IGNORED value - */ - Job.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - values[valuesById[3] = "IN_PROGRESS"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "ABORTED"] = 6; - values[valuesById[7] = "SKIPPED"] = 7; - values[valuesById[8] = "IGNORED"] = 8; - return values; - })(); - - return Job; + return CreateChildRolloutJobRun; })(); - v1.DeployJob = (function() { + v1.AdvanceChildRolloutJobRun = (function() { /** - * Properties of a DeployJob. + * Properties of an AdvanceChildRolloutJobRun. * @memberof google.cloud.deploy.v1 - * @interface IDeployJob + * @interface IAdvanceChildRolloutJobRun + * @property {string|null} [rollout] AdvanceChildRolloutJobRun rollout + * @property {string|null} [rolloutPhaseId] AdvanceChildRolloutJobRun rolloutPhaseId */ /** - * Constructs a new DeployJob. + * Constructs a new AdvanceChildRolloutJobRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeployJob. - * @implements IDeployJob + * @classdesc Represents an AdvanceChildRolloutJobRun. + * @implements IAdvanceChildRolloutJobRun * @constructor - * @param {google.cloud.deploy.v1.IDeployJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun=} [properties] Properties to set */ - function DeployJob(properties) { + function AdvanceChildRolloutJobRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20582,63 +30331,91 @@ } /** - * Creates a new DeployJob instance using the specified properties. + * AdvanceChildRolloutJobRun rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @instance + */ + AdvanceChildRolloutJobRun.prototype.rollout = ""; + + /** + * AdvanceChildRolloutJobRun rolloutPhaseId. + * @member {string} rolloutPhaseId + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @instance + */ + AdvanceChildRolloutJobRun.prototype.rolloutPhaseId = ""; + + /** + * Creates a new AdvanceChildRolloutJobRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.IDeployJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeployJob} DeployJob instance + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun instance */ - DeployJob.create = function create(properties) { - return new DeployJob(properties); + AdvanceChildRolloutJobRun.create = function create(properties) { + return new AdvanceChildRolloutJobRun(properties); }; /** - * Encodes the specified DeployJob message. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * Encodes the specified AdvanceChildRolloutJobRun message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJobRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.IDeployJob} message DeployJob message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun} message AdvanceChildRolloutJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployJob.encode = function encode(message, writer) { + AdvanceChildRolloutJobRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); + if (message.rolloutPhaseId != null && Object.hasOwnProperty.call(message, "rolloutPhaseId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutPhaseId); return writer; }; /** - * Encodes the specified DeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJob.verify|verify} messages. + * Encodes the specified AdvanceChildRolloutJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJobRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.IDeployJob} message DeployJob message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun} message AdvanceChildRolloutJobRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployJob.encodeDelimited = function encodeDelimited(message, writer) { + AdvanceChildRolloutJobRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployJob message from the specified reader or buffer. + * Decodes an AdvanceChildRolloutJobRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployJob.decode = function decode(reader, length) { + AdvanceChildRolloutJobRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.rollout = reader.string(); + break; + } + case 2: { + message.rolloutPhaseId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20648,108 +30425,135 @@ }; /** - * Decodes a DeployJob message from the specified reader or buffer, length delimited. + * Decodes an AdvanceChildRolloutJobRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployJob.decodeDelimited = function decodeDelimited(reader) { + AdvanceChildRolloutJobRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployJob message. + * Verifies an AdvanceChildRolloutJobRun message. * @function verify - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployJob.verify = function verify(message) { + AdvanceChildRolloutJobRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) + if (!$util.isString(message.rolloutPhaseId)) + return "rolloutPhaseId: string expected"; return null; }; /** - * Creates a DeployJob message from a plain object. Also converts values to their respective internal types. + * Creates an AdvanceChildRolloutJobRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeployJob} DeployJob + * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun */ - DeployJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeployJob) + AdvanceChildRolloutJobRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun) return object; - return new $root.google.cloud.deploy.v1.DeployJob(); + var message = new $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun(); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.rolloutPhaseId != null) + message.rolloutPhaseId = String(object.rolloutPhaseId); + return message; }; /** - * Creates a plain object from a DeployJob message. Also converts values to other types if specified. + * Creates a plain object from an AdvanceChildRolloutJobRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static - * @param {google.cloud.deploy.v1.DeployJob} message DeployJob + * @param {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} message AdvanceChildRolloutJobRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployJob.toObject = function toObject() { - return {}; + AdvanceChildRolloutJobRun.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rollout = ""; + object.rolloutPhaseId = ""; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) + object.rolloutPhaseId = message.rolloutPhaseId; + return object; }; /** - * Converts this DeployJob to JSON. + * Converts this AdvanceChildRolloutJobRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @instance * @returns {Object.} JSON object */ - DeployJob.prototype.toJSON = function toJSON() { + AdvanceChildRolloutJobRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployJob + * Gets the default type url for AdvanceChildRolloutJobRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeployJob + * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvanceChildRolloutJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJob"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceChildRolloutJobRun"; }; - return DeployJob; + return AdvanceChildRolloutJobRun; })(); - v1.VerifyJob = (function() { + v1.ListJobRunsRequest = (function() { /** - * Properties of a VerifyJob. + * Properties of a ListJobRunsRequest. * @memberof google.cloud.deploy.v1 - * @interface IVerifyJob + * @interface IListJobRunsRequest + * @property {string|null} [parent] ListJobRunsRequest parent + * @property {number|null} [pageSize] ListJobRunsRequest pageSize + * @property {string|null} [pageToken] ListJobRunsRequest pageToken + * @property {string|null} [filter] ListJobRunsRequest filter + * @property {string|null} [orderBy] ListJobRunsRequest orderBy */ /** - * Constructs a new VerifyJob. + * Constructs a new ListJobRunsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a VerifyJob. - * @implements IVerifyJob + * @classdesc Represents a ListJobRunsRequest. + * @implements IListJobRunsRequest * @constructor - * @param {google.cloud.deploy.v1.IVerifyJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListJobRunsRequest=} [properties] Properties to set */ - function VerifyJob(properties) { + function ListJobRunsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20757,63 +30561,133 @@ } /** - * Creates a new VerifyJob instance using the specified properties. + * ListJobRunsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @instance + */ + ListJobRunsRequest.prototype.parent = ""; + + /** + * ListJobRunsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @instance + */ + ListJobRunsRequest.prototype.pageSize = 0; + + /** + * ListJobRunsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @instance + */ + ListJobRunsRequest.prototype.pageToken = ""; + + /** + * ListJobRunsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @instance + */ + ListJobRunsRequest.prototype.filter = ""; + + /** + * ListJobRunsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @instance + */ + ListJobRunsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListJobRunsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.IVerifyJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob instance + * @param {google.cloud.deploy.v1.IListJobRunsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest instance */ - VerifyJob.create = function create(properties) { - return new VerifyJob(properties); + ListJobRunsRequest.create = function create(properties) { + return new ListJobRunsRequest(properties); }; /** - * Encodes the specified VerifyJob message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. + * Encodes the specified ListJobRunsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.IVerifyJob} message VerifyJob message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsRequest} message ListJobRunsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyJob.encode = function encode(message, writer) { + ListJobRunsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified VerifyJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJob.verify|verify} messages. + * Encodes the specified ListJobRunsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.IVerifyJob} message VerifyJob message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsRequest} message ListJobRunsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyJob.encodeDelimited = function encodeDelimited(message, writer) { + ListJobRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerifyJob message from the specified reader or buffer. + * Decodes a ListJobRunsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyJob.decode = function decode(reader, length) { + ListJobRunsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.VerifyJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListJobRunsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20823,110 +30697,159 @@ }; /** - * Decodes a VerifyJob message from the specified reader or buffer, length delimited. + * Decodes a ListJobRunsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyJob.decodeDelimited = function decodeDelimited(reader) { + ListJobRunsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerifyJob message. + * Verifies a ListJobRunsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VerifyJob.verify = function verify(message) { + ListJobRunsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a VerifyJob message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobRunsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.VerifyJob} VerifyJob + * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest */ - VerifyJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.VerifyJob) + ListJobRunsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListJobRunsRequest) return object; - return new $root.google.cloud.deploy.v1.VerifyJob(); + var message = new $root.google.cloud.deploy.v1.ListJobRunsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; }; /** - * Creates a plain object from a VerifyJob message. Also converts values to other types if specified. + * Creates a plain object from a ListJobRunsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static - * @param {google.cloud.deploy.v1.VerifyJob} message VerifyJob + * @param {google.cloud.deploy.v1.ListJobRunsRequest} message ListJobRunsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerifyJob.toObject = function toObject() { - return {}; + ListJobRunsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; }; /** - * Converts this VerifyJob to JSON. + * Converts this ListJobRunsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @instance * @returns {Object.} JSON object */ - VerifyJob.prototype.toJSON = function toJSON() { + ListJobRunsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VerifyJob + * Gets the default type url for ListJobRunsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.VerifyJob + * @memberof google.cloud.deploy.v1.ListJobRunsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VerifyJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListJobRunsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.VerifyJob"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListJobRunsRequest"; }; - return VerifyJob; + return ListJobRunsRequest; })(); - v1.PredeployJob = (function() { + v1.ListJobRunsResponse = (function() { /** - * Properties of a PredeployJob. + * Properties of a ListJobRunsResponse. * @memberof google.cloud.deploy.v1 - * @interface IPredeployJob - * @property {Array.|null} [actions] PredeployJob actions + * @interface IListJobRunsResponse + * @property {Array.|null} [jobRuns] ListJobRunsResponse jobRuns + * @property {string|null} [nextPageToken] ListJobRunsResponse nextPageToken + * @property {Array.|null} [unreachable] ListJobRunsResponse unreachable */ /** - * Constructs a new PredeployJob. + * Constructs a new ListJobRunsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PredeployJob. - * @implements IPredeployJob + * @classdesc Represents a ListJobRunsResponse. + * @implements IListJobRunsResponse * @constructor - * @param {google.cloud.deploy.v1.IPredeployJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListJobRunsResponse=} [properties] Properties to set */ - function PredeployJob(properties) { - this.actions = []; + function ListJobRunsResponse(properties) { + this.jobRuns = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20934,78 +30857,109 @@ } /** - * PredeployJob actions. - * @member {Array.} actions - * @memberof google.cloud.deploy.v1.PredeployJob + * ListJobRunsResponse jobRuns. + * @member {Array.} jobRuns + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @instance */ - PredeployJob.prototype.actions = $util.emptyArray; + ListJobRunsResponse.prototype.jobRuns = $util.emptyArray; /** - * Creates a new PredeployJob instance using the specified properties. + * ListJobRunsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @instance + */ + ListJobRunsResponse.prototype.nextPageToken = ""; + + /** + * ListJobRunsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @instance + */ + ListJobRunsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListJobRunsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.IPredeployJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob instance + * @param {google.cloud.deploy.v1.IListJobRunsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse instance */ - PredeployJob.create = function create(properties) { - return new PredeployJob(properties); + ListJobRunsResponse.create = function create(properties) { + return new ListJobRunsResponse(properties); }; /** - * Encodes the specified PredeployJob message. Does not implicitly {@link google.cloud.deploy.v1.PredeployJob.verify|verify} messages. + * Encodes the specified ListJobRunsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.IPredeployJob} message PredeployJob message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsResponse} message ListJobRunsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredeployJob.encode = function encode(message, writer) { + ListJobRunsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.actions[i]); + if (message.jobRuns != null && message.jobRuns.length) + for (var i = 0; i < message.jobRuns.length; ++i) + $root.google.cloud.deploy.v1.JobRun.encode(message.jobRuns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified PredeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PredeployJob.verify|verify} messages. + * Encodes the specified ListJobRunsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.IPredeployJob} message PredeployJob message or plain object to encode + * @param {google.cloud.deploy.v1.IListJobRunsResponse} message ListJobRunsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredeployJob.encodeDelimited = function encodeDelimited(message, writer) { + ListJobRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PredeployJob message from the specified reader or buffer. + * Decodes a ListJobRunsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredeployJob.decode = function decode(reader, length) { + ListJobRunsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PredeployJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListJobRunsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push(reader.string()); + if (!(message.jobRuns && message.jobRuns.length)) + message.jobRuns = []; + message.jobRuns.push($root.google.cloud.deploy.v1.JobRun.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -21017,135 +30971,169 @@ }; /** - * Decodes a PredeployJob message from the specified reader or buffer, length delimited. + * Decodes a ListJobRunsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredeployJob.decodeDelimited = function decodeDelimited(reader) { + ListJobRunsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PredeployJob message. + * Verifies a ListJobRunsResponse message. * @function verify - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PredeployJob.verify = function verify(message) { + ListJobRunsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) - if (!$util.isString(message.actions[i])) - return "actions: string[] expected"; + if (message.jobRuns != null && message.hasOwnProperty("jobRuns")) { + if (!Array.isArray(message.jobRuns)) + return "jobRuns: array expected"; + for (var i = 0; i < message.jobRuns.length; ++i) { + var error = $root.google.cloud.deploy.v1.JobRun.verify(message.jobRuns[i]); + if (error) + return "jobRuns." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } return null; }; /** - * Creates a PredeployJob message from a plain object. Also converts values to their respective internal types. + * Creates a ListJobRunsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PredeployJob} PredeployJob + * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse */ - PredeployJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PredeployJob) + ListJobRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListJobRunsResponse) return object; - var message = new $root.google.cloud.deploy.v1.PredeployJob(); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.deploy.v1.PredeployJob.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) - message.actions[i] = String(object.actions[i]); + var message = new $root.google.cloud.deploy.v1.ListJobRunsResponse(); + if (object.jobRuns) { + if (!Array.isArray(object.jobRuns)) + throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.jobRuns: array expected"); + message.jobRuns = []; + for (var i = 0; i < object.jobRuns.length; ++i) { + if (typeof object.jobRuns[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.jobRuns: object expected"); + message.jobRuns[i] = $root.google.cloud.deploy.v1.JobRun.fromObject(object.jobRuns[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } return message; }; /** - * Creates a plain object from a PredeployJob message. Also converts values to other types if specified. + * Creates a plain object from a ListJobRunsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static - * @param {google.cloud.deploy.v1.PredeployJob} message PredeployJob + * @param {google.cloud.deploy.v1.ListJobRunsResponse} message ListJobRunsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PredeployJob.toObject = function toObject(message, options) { + ListJobRunsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = message.actions[j]; + if (options.arrays || options.defaults) { + object.jobRuns = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.jobRuns && message.jobRuns.length) { + object.jobRuns = []; + for (var j = 0; j < message.jobRuns.length; ++j) + object.jobRuns[j] = $root.google.cloud.deploy.v1.JobRun.toObject(message.jobRuns[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } return object; }; /** - * Converts this PredeployJob to JSON. + * Converts this ListJobRunsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @instance * @returns {Object.} JSON object */ - PredeployJob.prototype.toJSON = function toJSON() { + ListJobRunsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PredeployJob + * Gets the default type url for ListJobRunsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PredeployJob + * @memberof google.cloud.deploy.v1.ListJobRunsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PredeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListJobRunsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PredeployJob"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListJobRunsResponse"; }; - return PredeployJob; + return ListJobRunsResponse; })(); - v1.PostdeployJob = (function() { + v1.GetJobRunRequest = (function() { /** - * Properties of a PostdeployJob. + * Properties of a GetJobRunRequest. * @memberof google.cloud.deploy.v1 - * @interface IPostdeployJob - * @property {Array.|null} [actions] PostdeployJob actions + * @interface IGetJobRunRequest + * @property {string|null} [name] GetJobRunRequest name */ /** - * Constructs a new PostdeployJob. + * Constructs a new GetJobRunRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PostdeployJob. - * @implements IPostdeployJob + * @classdesc Represents a GetJobRunRequest. + * @implements IGetJobRunRequest * @constructor - * @param {google.cloud.deploy.v1.IPostdeployJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetJobRunRequest=} [properties] Properties to set */ - function PostdeployJob(properties) { - this.actions = []; + function GetJobRunRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21153,78 +31141,75 @@ } /** - * PostdeployJob actions. - * @member {Array.} actions - * @memberof google.cloud.deploy.v1.PostdeployJob + * GetJobRunRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @instance */ - PostdeployJob.prototype.actions = $util.emptyArray; + GetJobRunRequest.prototype.name = ""; /** - * Creates a new PostdeployJob instance using the specified properties. + * Creates a new GetJobRunRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.IPostdeployJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob instance + * @param {google.cloud.deploy.v1.IGetJobRunRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest instance */ - PostdeployJob.create = function create(properties) { - return new PostdeployJob(properties); + GetJobRunRequest.create = function create(properties) { + return new GetJobRunRequest(properties); }; /** - * Encodes the specified PostdeployJob message. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJob.verify|verify} messages. + * Encodes the specified GetJobRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.IPostdeployJob} message PostdeployJob message or plain object to encode + * @param {google.cloud.deploy.v1.IGetJobRunRequest} message GetJobRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostdeployJob.encode = function encode(message, writer) { + GetJobRunRequest.encode = function encode(message, writer) { if (!writer) - writer = $Writer.create(); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.actions[i]); + 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 PostdeployJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJob.verify|verify} messages. + * Encodes the specified GetJobRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.IPostdeployJob} message PostdeployJob message or plain object to encode + * @param {google.cloud.deploy.v1.IGetJobRunRequest} message GetJobRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostdeployJob.encodeDelimited = function encodeDelimited(message, writer) { + GetJobRunRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostdeployJob message from the specified reader or buffer. + * Decodes a GetJobRunRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostdeployJob.decode = function decode(reader, length) { + GetJobRunRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PostdeployJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetJobRunRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push(reader.string()); + message.name = reader.string(); break; } default: @@ -21236,133 +31221,122 @@ }; /** - * Decodes a PostdeployJob message from the specified reader or buffer, length delimited. + * Decodes a GetJobRunRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostdeployJob.decodeDelimited = function decodeDelimited(reader) { + GetJobRunRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostdeployJob message. + * Verifies a GetJobRunRequest message. * @function verify - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostdeployJob.verify = function verify(message) { + GetJobRunRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) - if (!$util.isString(message.actions[i])) - return "actions: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a PostdeployJob message from a plain object. Also converts values to their respective internal types. + * Creates a GetJobRunRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PostdeployJob} PostdeployJob + * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest */ - PostdeployJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PostdeployJob) + GetJobRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetJobRunRequest) return object; - var message = new $root.google.cloud.deploy.v1.PostdeployJob(); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.deploy.v1.PostdeployJob.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) - message.actions[i] = String(object.actions[i]); - } + var message = new $root.google.cloud.deploy.v1.GetJobRunRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a PostdeployJob message. Also converts values to other types if specified. + * Creates a plain object from a GetJobRunRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static - * @param {google.cloud.deploy.v1.PostdeployJob} message PostdeployJob + * @param {google.cloud.deploy.v1.GetJobRunRequest} message GetJobRunRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostdeployJob.toObject = function toObject(message, options) { + GetJobRunRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = message.actions[j]; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this PostdeployJob to JSON. + * Converts this GetJobRunRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @instance * @returns {Object.} JSON object */ - PostdeployJob.prototype.toJSON = function toJSON() { + GetJobRunRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostdeployJob + * Gets the default type url for GetJobRunRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PostdeployJob + * @memberof google.cloud.deploy.v1.GetJobRunRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostdeployJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetJobRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PostdeployJob"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetJobRunRequest"; }; - return PostdeployJob; + return GetJobRunRequest; })(); - v1.CreateChildRolloutJob = (function() { + v1.TerminateJobRunRequest = (function() { /** - * Properties of a CreateChildRolloutJob. + * Properties of a TerminateJobRunRequest. * @memberof google.cloud.deploy.v1 - * @interface ICreateChildRolloutJob + * @interface ITerminateJobRunRequest + * @property {string|null} [name] TerminateJobRunRequest name */ /** - * Constructs a new CreateChildRolloutJob. + * Constructs a new TerminateJobRunRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateChildRolloutJob. - * @implements ICreateChildRolloutJob + * @classdesc Represents a TerminateJobRunRequest. + * @implements ITerminateJobRunRequest * @constructor - * @param {google.cloud.deploy.v1.ICreateChildRolloutJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ITerminateJobRunRequest=} [properties] Properties to set */ - function CreateChildRolloutJob(properties) { + function TerminateJobRunRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21370,63 +31344,77 @@ } /** - * Creates a new CreateChildRolloutJob instance using the specified properties. + * TerminateJobRunRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @instance + */ + TerminateJobRunRequest.prototype.name = ""; + + /** + * Creates a new TerminateJobRunRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static - * @param {google.cloud.deploy.v1.ICreateChildRolloutJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob instance + * @param {google.cloud.deploy.v1.ITerminateJobRunRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest instance */ - CreateChildRolloutJob.create = function create(properties) { - return new CreateChildRolloutJob(properties); + TerminateJobRunRequest.create = function create(properties) { + return new TerminateJobRunRequest(properties); }; /** - * Encodes the specified CreateChildRolloutJob message. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJob.verify|verify} messages. + * Encodes the specified TerminateJobRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static - * @param {google.cloud.deploy.v1.ICreateChildRolloutJob} message CreateChildRolloutJob message or plain object to encode + * @param {google.cloud.deploy.v1.ITerminateJobRunRequest} message TerminateJobRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChildRolloutJob.encode = function encode(message, writer) { + TerminateJobRunRequest.encode = function encode(message, writer) { 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 CreateChildRolloutJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJob.verify|verify} messages. + * Encodes the specified TerminateJobRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static - * @param {google.cloud.deploy.v1.ICreateChildRolloutJob} message CreateChildRolloutJob message or plain object to encode + * @param {google.cloud.deploy.v1.ITerminateJobRunRequest} message TerminateJobRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChildRolloutJob.encodeDelimited = function encodeDelimited(message, writer) { + TerminateJobRunRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateChildRolloutJob message from the specified reader or buffer. + * Decodes a TerminateJobRunRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob + * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChildRolloutJob.decode = function decode(reader, length) { + TerminateJobRunRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateChildRolloutJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TerminateJobRunRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21436,108 +31424,121 @@ }; /** - * Decodes a CreateChildRolloutJob message from the specified reader or buffer, length delimited. + * Decodes a TerminateJobRunRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob + * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChildRolloutJob.decodeDelimited = function decodeDelimited(reader) { + TerminateJobRunRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateChildRolloutJob message. + * Verifies a TerminateJobRunRequest message. * @function verify - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateChildRolloutJob.verify = function verify(message) { + TerminateJobRunRequest.verify = function verify(message) { if (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 CreateChildRolloutJob message from a plain object. Also converts values to their respective internal types. + * Creates a TerminateJobRunRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateChildRolloutJob} CreateChildRolloutJob + * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest */ - CreateChildRolloutJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateChildRolloutJob) + TerminateJobRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TerminateJobRunRequest) return object; - return new $root.google.cloud.deploy.v1.CreateChildRolloutJob(); + var message = new $root.google.cloud.deploy.v1.TerminateJobRunRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a CreateChildRolloutJob message. Also converts values to other types if specified. + * Creates a plain object from a TerminateJobRunRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static - * @param {google.cloud.deploy.v1.CreateChildRolloutJob} message CreateChildRolloutJob + * @param {google.cloud.deploy.v1.TerminateJobRunRequest} message TerminateJobRunRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateChildRolloutJob.toObject = function toObject() { - return {}; + TerminateJobRunRequest.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 CreateChildRolloutJob to JSON. + * Converts this TerminateJobRunRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @instance * @returns {Object.} JSON object */ - CreateChildRolloutJob.prototype.toJSON = function toJSON() { + TerminateJobRunRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateChildRolloutJob + * Gets the default type url for TerminateJobRunRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateChildRolloutJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TerminateJobRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateChildRolloutJob"; + return typeUrlPrefix + "/google.cloud.deploy.v1.TerminateJobRunRequest"; }; - return CreateChildRolloutJob; + return TerminateJobRunRequest; })(); - v1.AdvanceChildRolloutJob = (function() { + v1.TerminateJobRunResponse = (function() { /** - * Properties of an AdvanceChildRolloutJob. + * Properties of a TerminateJobRunResponse. * @memberof google.cloud.deploy.v1 - * @interface IAdvanceChildRolloutJob + * @interface ITerminateJobRunResponse */ /** - * Constructs a new AdvanceChildRolloutJob. + * Constructs a new TerminateJobRunResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AdvanceChildRolloutJob. - * @implements IAdvanceChildRolloutJob + * @classdesc Represents a TerminateJobRunResponse. + * @implements ITerminateJobRunResponse * @constructor - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ITerminateJobRunResponse=} [properties] Properties to set */ - function AdvanceChildRolloutJob(properties) { + function TerminateJobRunResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21545,60 +31546,60 @@ } /** - * Creates a new AdvanceChildRolloutJob instance using the specified properties. + * Creates a new TerminateJobRunResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob instance + * @param {google.cloud.deploy.v1.ITerminateJobRunResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse instance */ - AdvanceChildRolloutJob.create = function create(properties) { - return new AdvanceChildRolloutJob(properties); + TerminateJobRunResponse.create = function create(properties) { + return new TerminateJobRunResponse(properties); }; /** - * Encodes the specified AdvanceChildRolloutJob message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJob.verify|verify} messages. + * Encodes the specified TerminateJobRunResponse message. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob} message AdvanceChildRolloutJob message or plain object to encode + * @param {google.cloud.deploy.v1.ITerminateJobRunResponse} message TerminateJobRunResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceChildRolloutJob.encode = function encode(message, writer) { + TerminateJobRunResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified AdvanceChildRolloutJob message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJob.verify|verify} messages. + * Encodes the specified TerminateJobRunResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJob} message AdvanceChildRolloutJob message or plain object to encode + * @param {google.cloud.deploy.v1.ITerminateJobRunResponse} message TerminateJobRunResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceChildRolloutJob.encodeDelimited = function encodeDelimited(message, writer) { + TerminateJobRunResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdvanceChildRolloutJob message from the specified reader or buffer. + * Decodes a TerminateJobRunResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob + * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceChildRolloutJob.decode = function decode(reader, length) { + TerminateJobRunResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceChildRolloutJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TerminateJobRunResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -21611,113 +31612,112 @@ }; /** - * Decodes an AdvanceChildRolloutJob message from the specified reader or buffer, length delimited. + * Decodes a TerminateJobRunResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob + * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceChildRolloutJob.decodeDelimited = function decodeDelimited(reader) { + TerminateJobRunResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdvanceChildRolloutJob message. + * Verifies a TerminateJobRunResponse message. * @function verify - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdvanceChildRolloutJob.verify = function verify(message) { + TerminateJobRunResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an AdvanceChildRolloutJob message from a plain object. Also converts values to their respective internal types. + * Creates a TerminateJobRunResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJob} AdvanceChildRolloutJob + * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse */ - AdvanceChildRolloutJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AdvanceChildRolloutJob) + TerminateJobRunResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.TerminateJobRunResponse) return object; - return new $root.google.cloud.deploy.v1.AdvanceChildRolloutJob(); + return new $root.google.cloud.deploy.v1.TerminateJobRunResponse(); }; /** - * Creates a plain object from an AdvanceChildRolloutJob message. Also converts values to other types if specified. + * Creates a plain object from a TerminateJobRunResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static - * @param {google.cloud.deploy.v1.AdvanceChildRolloutJob} message AdvanceChildRolloutJob + * @param {google.cloud.deploy.v1.TerminateJobRunResponse} message TerminateJobRunResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdvanceChildRolloutJob.toObject = function toObject() { + TerminateJobRunResponse.toObject = function toObject() { return {}; }; /** - * Converts this AdvanceChildRolloutJob to JSON. + * Converts this TerminateJobRunResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @instance * @returns {Object.} JSON object */ - AdvanceChildRolloutJob.prototype.toJSON = function toJSON() { + TerminateJobRunResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdvanceChildRolloutJob + * Gets the default type url for TerminateJobRunResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJob + * @memberof google.cloud.deploy.v1.TerminateJobRunResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdvanceChildRolloutJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TerminateJobRunResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceChildRolloutJob"; + return typeUrlPrefix + "/google.cloud.deploy.v1.TerminateJobRunResponse"; }; - return AdvanceChildRolloutJob; + return TerminateJobRunResponse; })(); - v1.ListRolloutsRequest = (function() { + v1.Config = (function() { /** - * Properties of a ListRolloutsRequest. + * Properties of a Config. * @memberof google.cloud.deploy.v1 - * @interface IListRolloutsRequest - * @property {string|null} [parent] ListRolloutsRequest parent - * @property {number|null} [pageSize] ListRolloutsRequest pageSize - * @property {string|null} [pageToken] ListRolloutsRequest pageToken - * @property {string|null} [filter] ListRolloutsRequest filter - * @property {string|null} [orderBy] ListRolloutsRequest orderBy + * @interface IConfig + * @property {string|null} [name] Config name + * @property {Array.|null} [supportedVersions] Config supportedVersions + * @property {string|null} [defaultSkaffoldVersion] Config defaultSkaffoldVersion */ /** - * Constructs a new ListRolloutsRequest. + * Constructs a new Config. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListRolloutsRequest. - * @implements IListRolloutsRequest + * @classdesc Represents a Config. + * @implements IConfig * @constructor - * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IConfig=} [properties] Properties to set */ - function ListRolloutsRequest(properties) { + function Config(properties) { + this.supportedVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21725,131 +31725,106 @@ } /** - * ListRolloutsRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListRolloutsRequest - * @instance - */ - ListRolloutsRequest.prototype.parent = ""; - - /** - * ListRolloutsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListRolloutsRequest - * @instance - */ - ListRolloutsRequest.prototype.pageSize = 0; - - /** - * ListRolloutsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * Config name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Config * @instance */ - ListRolloutsRequest.prototype.pageToken = ""; + Config.prototype.name = ""; /** - * ListRolloutsRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * Config supportedVersions. + * @member {Array.} supportedVersions + * @memberof google.cloud.deploy.v1.Config * @instance */ - ListRolloutsRequest.prototype.filter = ""; + Config.prototype.supportedVersions = $util.emptyArray; /** - * ListRolloutsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * Config defaultSkaffoldVersion. + * @member {string} defaultSkaffoldVersion + * @memberof google.cloud.deploy.v1.Config * @instance */ - ListRolloutsRequest.prototype.orderBy = ""; + Config.prototype.defaultSkaffoldVersion = ""; /** - * Creates a new ListRolloutsRequest instance using the specified properties. + * Creates a new Config instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static - * @param {google.cloud.deploy.v1.IListRolloutsRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest instance + * @param {google.cloud.deploy.v1.IConfig=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Config} Config instance */ - ListRolloutsRequest.create = function create(properties) { - return new ListRolloutsRequest(properties); + Config.create = function create(properties) { + return new Config(properties); }; /** - * Encodes the specified ListRolloutsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * Encodes the specified Config message. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static - * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IConfig} message Config message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsRequest.encode = function encode(message, writer) { + Config.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.supportedVersions != null && message.supportedVersions.length) + for (var i = 0; i < message.supportedVersions.length; ++i) + $root.google.cloud.deploy.v1.SkaffoldVersion.encode(message.supportedVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.defaultSkaffoldVersion != null && Object.hasOwnProperty.call(message, "defaultSkaffoldVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultSkaffoldVersion); return writer; }; /** - * Encodes the specified ListRolloutsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsRequest.verify|verify} messages. + * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static - * @param {google.cloud.deploy.v1.IListRolloutsRequest} message ListRolloutsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IConfig} message Config message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Config.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRolloutsRequest message from the specified reader or buffer. + * Decodes a Config message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @returns {google.cloud.deploy.v1.Config} Config * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsRequest.decode = function decode(reader, length) { + Config.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Config(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + if (!(message.supportedVersions && message.supportedVersions.length)) + message.supportedVersions = []; + message.supportedVersions.push($root.google.cloud.deploy.v1.SkaffoldVersion.decode(reader, reader.uint32())); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.defaultSkaffoldVersion = reader.string(); break; } default: @@ -21861,159 +31836,160 @@ }; /** - * Decodes a ListRolloutsRequest message from the specified reader or buffer, length delimited. + * Decodes a Config message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @returns {google.cloud.deploy.v1.Config} Config * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsRequest.decodeDelimited = function decodeDelimited(reader) { + Config.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRolloutsRequest message. + * Verifies a Config message. * @function verify - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRolloutsRequest.verify = function verify(message) { + Config.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.supportedVersions != null && message.hasOwnProperty("supportedVersions")) { + if (!Array.isArray(message.supportedVersions)) + return "supportedVersions: array expected"; + for (var i = 0; i < message.supportedVersions.length; ++i) { + var error = $root.google.cloud.deploy.v1.SkaffoldVersion.verify(message.supportedVersions[i]); + if (error) + return "supportedVersions." + error; + } + } + if (message.defaultSkaffoldVersion != null && message.hasOwnProperty("defaultSkaffoldVersion")) + if (!$util.isString(message.defaultSkaffoldVersion)) + return "defaultSkaffoldVersion: string expected"; return null; }; /** - * Creates a ListRolloutsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Config message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListRolloutsRequest} ListRolloutsRequest + * @returns {google.cloud.deploy.v1.Config} Config */ - ListRolloutsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsRequest) + Config.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Config) return object; - var message = new $root.google.cloud.deploy.v1.ListRolloutsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.deploy.v1.Config(); + if (object.name != null) + message.name = String(object.name); + if (object.supportedVersions) { + if (!Array.isArray(object.supportedVersions)) + throw TypeError(".google.cloud.deploy.v1.Config.supportedVersions: array expected"); + message.supportedVersions = []; + for (var i = 0; i < object.supportedVersions.length; ++i) { + if (typeof object.supportedVersions[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Config.supportedVersions: object expected"); + message.supportedVersions[i] = $root.google.cloud.deploy.v1.SkaffoldVersion.fromObject(object.supportedVersions[i]); + } + } + if (object.defaultSkaffoldVersion != null) + message.defaultSkaffoldVersion = String(object.defaultSkaffoldVersion); return message; }; /** - * Creates a plain object from a ListRolloutsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Config message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static - * @param {google.cloud.deploy.v1.ListRolloutsRequest} message ListRolloutsRequest + * @param {google.cloud.deploy.v1.Config} message Config * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRolloutsRequest.toObject = function toObject(message, options) { + Config.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.supportedVersions = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.name = ""; + object.defaultSkaffoldVersion = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.supportedVersions && message.supportedVersions.length) { + object.supportedVersions = []; + for (var j = 0; j < message.supportedVersions.length; ++j) + object.supportedVersions[j] = $root.google.cloud.deploy.v1.SkaffoldVersion.toObject(message.supportedVersions[j], options); + } + if (message.defaultSkaffoldVersion != null && message.hasOwnProperty("defaultSkaffoldVersion")) + object.defaultSkaffoldVersion = message.defaultSkaffoldVersion; return object; }; /** - * Converts this ListRolloutsRequest to JSON. + * Converts this Config to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @instance * @returns {Object.} JSON object */ - ListRolloutsRequest.prototype.toJSON = function toJSON() { + Config.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListRolloutsRequest + * Gets the default type url for Config * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListRolloutsRequest + * @memberof google.cloud.deploy.v1.Config * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListRolloutsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Config"; }; - return ListRolloutsRequest; + return Config; })(); - v1.ListRolloutsResponse = (function() { + v1.SkaffoldVersion = (function() { /** - * Properties of a ListRolloutsResponse. + * Properties of a SkaffoldVersion. * @memberof google.cloud.deploy.v1 - * @interface IListRolloutsResponse - * @property {Array.|null} [rollouts] ListRolloutsResponse rollouts - * @property {string|null} [nextPageToken] ListRolloutsResponse nextPageToken - * @property {Array.|null} [unreachable] ListRolloutsResponse unreachable + * @interface ISkaffoldVersion + * @property {string|null} [version] SkaffoldVersion version + * @property {google.protobuf.ITimestamp|null} [maintenanceModeTime] SkaffoldVersion maintenanceModeTime + * @property {google.protobuf.ITimestamp|null} [supportExpirationTime] SkaffoldVersion supportExpirationTime + * @property {google.type.IDate|null} [supportEndDate] SkaffoldVersion supportEndDate */ /** - * Constructs a new ListRolloutsResponse. + * Constructs a new SkaffoldVersion. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListRolloutsResponse. - * @implements IListRolloutsResponse + * @classdesc Represents a SkaffoldVersion. + * @implements ISkaffoldVersion * @constructor - * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ISkaffoldVersion=} [properties] Properties to set */ - function ListRolloutsResponse(properties) { - this.rollouts = []; - this.unreachable = []; + function SkaffoldVersion(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22021,109 +31997,117 @@ } /** - * ListRolloutsResponse rollouts. - * @member {Array.} rollouts - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * SkaffoldVersion version. + * @member {string} version + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @instance */ - ListRolloutsResponse.prototype.rollouts = $util.emptyArray; + SkaffoldVersion.prototype.version = ""; /** - * ListRolloutsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * SkaffoldVersion maintenanceModeTime. + * @member {google.protobuf.ITimestamp|null|undefined} maintenanceModeTime + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @instance */ - ListRolloutsResponse.prototype.nextPageToken = ""; + SkaffoldVersion.prototype.maintenanceModeTime = null; /** - * ListRolloutsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * SkaffoldVersion supportExpirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} supportExpirationTime + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @instance */ - ListRolloutsResponse.prototype.unreachable = $util.emptyArray; + SkaffoldVersion.prototype.supportExpirationTime = null; /** - * Creates a new ListRolloutsResponse instance using the specified properties. + * SkaffoldVersion supportEndDate. + * @member {google.type.IDate|null|undefined} supportEndDate + * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @instance + */ + SkaffoldVersion.prototype.supportEndDate = null; + + /** + * Creates a new SkaffoldVersion instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static - * @param {google.cloud.deploy.v1.IListRolloutsResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse instance + * @param {google.cloud.deploy.v1.ISkaffoldVersion=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion instance */ - ListRolloutsResponse.create = function create(properties) { - return new ListRolloutsResponse(properties); + SkaffoldVersion.create = function create(properties) { + return new SkaffoldVersion(properties); }; /** - * Encodes the specified ListRolloutsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * Encodes the specified SkaffoldVersion message. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static - * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.ISkaffoldVersion} message SkaffoldVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsResponse.encode = function encode(message, writer) { + SkaffoldVersion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rollouts != null && message.rollouts.length) - for (var i = 0; i < message.rollouts.length; ++i) - $root.google.cloud.deploy.v1.Rollout.encode(message.rollouts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.supportEndDate != null && Object.hasOwnProperty.call(message, "supportEndDate")) + $root.google.type.Date.encode(message.supportEndDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maintenanceModeTime != null && Object.hasOwnProperty.call(message, "maintenanceModeTime")) + $root.google.protobuf.Timestamp.encode(message.maintenanceModeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.supportExpirationTime != null && Object.hasOwnProperty.call(message, "supportExpirationTime")) + $root.google.protobuf.Timestamp.encode(message.supportExpirationTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListRolloutsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListRolloutsResponse.verify|verify} messages. + * Encodes the specified SkaffoldVersion message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static - * @param {google.cloud.deploy.v1.IListRolloutsResponse} message ListRolloutsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.ISkaffoldVersion} message SkaffoldVersion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListRolloutsResponse.encodeDelimited = function encodeDelimited(message, writer) { + SkaffoldVersion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListRolloutsResponse message from the specified reader or buffer. + * Decodes a SkaffoldVersion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsResponse.decode = function decode(reader, length) { + SkaffoldVersion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.SkaffoldVersion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.rollouts && message.rollouts.length)) - message.rollouts = []; - message.rollouts.push($root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32())); + message.version = reader.string(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.maintenanceModeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + case 4: { + message.supportExpirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); break; } default: @@ -22135,169 +32119,162 @@ }; /** - * Decodes a ListRolloutsResponse message from the specified reader or buffer, length delimited. + * Decodes a SkaffoldVersion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListRolloutsResponse.decodeDelimited = function decodeDelimited(reader) { + SkaffoldVersion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListRolloutsResponse message. + * Verifies a SkaffoldVersion message. * @function verify - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListRolloutsResponse.verify = function verify(message) { + SkaffoldVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rollouts != null && message.hasOwnProperty("rollouts")) { - if (!Array.isArray(message.rollouts)) - return "rollouts: array expected"; - for (var i = 0; i < message.rollouts.length; ++i) { - var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollouts[i]); - if (error) - return "rollouts." + error; - } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.maintenanceModeTime); + if (error) + return "maintenanceModeTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.supportExpirationTime); + if (error) + return "supportExpirationTime." + error; + } + if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) { + var error = $root.google.type.Date.verify(message.supportEndDate); + if (error) + return "supportEndDate." + error; } return null; }; /** - * Creates a ListRolloutsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SkaffoldVersion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListRolloutsResponse} ListRolloutsResponse + * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion */ - ListRolloutsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListRolloutsResponse) + SkaffoldVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.SkaffoldVersion) return object; - var message = new $root.google.cloud.deploy.v1.ListRolloutsResponse(); - if (object.rollouts) { - if (!Array.isArray(object.rollouts)) - throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: array expected"); - message.rollouts = []; - for (var i = 0; i < object.rollouts.length; ++i) { - if (typeof object.rollouts[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.rollouts: object expected"); - message.rollouts[i] = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollouts[i]); - } + var message = new $root.google.cloud.deploy.v1.SkaffoldVersion(); + if (object.version != null) + message.version = String(object.version); + if (object.maintenanceModeTime != null) { + if (typeof object.maintenanceModeTime !== "object") + throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.maintenanceModeTime: object expected"); + message.maintenanceModeTime = $root.google.protobuf.Timestamp.fromObject(object.maintenanceModeTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListRolloutsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.supportExpirationTime != null) { + if (typeof object.supportExpirationTime !== "object") + throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.supportExpirationTime: object expected"); + message.supportExpirationTime = $root.google.protobuf.Timestamp.fromObject(object.supportExpirationTime); + } + if (object.supportEndDate != null) { + if (typeof object.supportEndDate !== "object") + throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.supportEndDate: object expected"); + message.supportEndDate = $root.google.type.Date.fromObject(object.supportEndDate); } return message; }; /** - * Creates a plain object from a ListRolloutsResponse message. Also converts values to other types if specified. + * Creates a plain object from a SkaffoldVersion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static - * @param {google.cloud.deploy.v1.ListRolloutsResponse} message ListRolloutsResponse + * @param {google.cloud.deploy.v1.SkaffoldVersion} message SkaffoldVersion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListRolloutsResponse.toObject = function toObject(message, options) { + SkaffoldVersion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.rollouts = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.rollouts && message.rollouts.length) { - object.rollouts = []; - for (var j = 0; j < message.rollouts.length; ++j) - object.rollouts[j] = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollouts[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.version = ""; + object.supportEndDate = null; + object.maintenanceModeTime = null; + object.supportExpirationTime = null; } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) + object.supportEndDate = $root.google.type.Date.toObject(message.supportEndDate, options); + if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) + object.maintenanceModeTime = $root.google.protobuf.Timestamp.toObject(message.maintenanceModeTime, options); + if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) + object.supportExpirationTime = $root.google.protobuf.Timestamp.toObject(message.supportExpirationTime, options); return object; }; /** - * Converts this ListRolloutsResponse to JSON. + * Converts this SkaffoldVersion to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @instance * @returns {Object.} JSON object */ - ListRolloutsResponse.prototype.toJSON = function toJSON() { + SkaffoldVersion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListRolloutsResponse + * Gets the default type url for SkaffoldVersion * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListRolloutsResponse + * @memberof google.cloud.deploy.v1.SkaffoldVersion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListRolloutsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SkaffoldVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListRolloutsResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.SkaffoldVersion"; }; - return ListRolloutsResponse; + return SkaffoldVersion; })(); - v1.GetRolloutRequest = (function() { + v1.GetConfigRequest = (function() { /** - * Properties of a GetRolloutRequest. + * Properties of a GetConfigRequest. * @memberof google.cloud.deploy.v1 - * @interface IGetRolloutRequest - * @property {string|null} [name] GetRolloutRequest name + * @interface IGetConfigRequest + * @property {string|null} [name] GetConfigRequest name */ /** - * Constructs a new GetRolloutRequest. + * Constructs a new GetConfigRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetRolloutRequest. - * @implements IGetRolloutRequest + * @classdesc Represents a GetConfigRequest. + * @implements IGetConfigRequest * @constructor - * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetConfigRequest=} [properties] Properties to set */ - function GetRolloutRequest(properties) { + function GetConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22305,35 +32282,35 @@ } /** - * GetRolloutRequest name. + * GetConfigRequest name. * @member {string} name - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @instance */ - GetRolloutRequest.prototype.name = ""; + GetConfigRequest.prototype.name = ""; /** - * Creates a new GetRolloutRequest instance using the specified properties. + * Creates a new GetConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static - * @param {google.cloud.deploy.v1.IGetRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest instance + * @param {google.cloud.deploy.v1.IGetConfigRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest instance */ - GetRolloutRequest.create = function create(properties) { - return new GetRolloutRequest(properties); + GetConfigRequest.create = function create(properties) { + return new GetConfigRequest(properties); }; /** - * Encodes the specified GetRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * Encodes the specified GetConfigRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static - * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IGetConfigRequest} message GetConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRolloutRequest.encode = function encode(message, writer) { + GetConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -22342,33 +32319,33 @@ }; /** - * Encodes the specified GetRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetRolloutRequest.verify|verify} messages. + * Encodes the specified GetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static - * @param {google.cloud.deploy.v1.IGetRolloutRequest} message GetRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IGetConfigRequest} message GetConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetRolloutRequest message from the specified reader or buffer. + * Decodes a GetConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRolloutRequest.decode = function decode(reader, length) { + GetConfigRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -22385,30 +32362,30 @@ }; /** - * Decodes a GetRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + GetConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetRolloutRequest message. + * Verifies a GetConfigRequest message. * @function verify - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetRolloutRequest.verify = function verify(message) { + GetConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -22418,32 +32395,32 @@ }; /** - * Creates a GetRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetRolloutRequest} GetRolloutRequest + * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest */ - GetRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetRolloutRequest) + GetConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetConfigRequest) return object; - var message = new $root.google.cloud.deploy.v1.GetRolloutRequest(); + var message = new $root.google.cloud.deploy.v1.GetConfigRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static - * @param {google.cloud.deploy.v1.GetRolloutRequest} message GetRolloutRequest + * @param {google.cloud.deploy.v1.GetConfigRequest} message GetConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetRolloutRequest.toObject = function toObject(message, options) { + GetConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -22455,203 +32432,339 @@ }; /** - * Converts this GetRolloutRequest to JSON. + * Converts this GetConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @instance * @returns {Object.} JSON object */ - GetRolloutRequest.prototype.toJSON = function toJSON() { + GetConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetRolloutRequest + * Gets the default type url for GetConfigRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetRolloutRequest + * @memberof google.cloud.deploy.v1.GetConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetConfigRequest"; }; - return GetRolloutRequest; + return GetConfigRequest; })(); - v1.CreateRolloutRequest = (function() { + v1.Automation = (function() { + + /** + * Properties of an Automation. + * @memberof google.cloud.deploy.v1 + * @interface IAutomation + * @property {string|null} [name] Automation name + * @property {string|null} [uid] Automation uid + * @property {string|null} [description] Automation description + * @property {google.protobuf.ITimestamp|null} [createTime] Automation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Automation updateTime + * @property {Object.|null} [annotations] Automation annotations + * @property {Object.|null} [labels] Automation labels + * @property {string|null} [etag] Automation etag + * @property {boolean|null} [suspended] Automation suspended + * @property {string|null} [serviceAccount] Automation serviceAccount + * @property {google.cloud.deploy.v1.IAutomationResourceSelector|null} [selector] Automation selector + * @property {Array.|null} [rules] Automation rules + */ + + /** + * Constructs a new Automation. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents an Automation. + * @implements IAutomation + * @constructor + * @param {google.cloud.deploy.v1.IAutomation=} [properties] Properties to set + */ + function Automation(properties) { + this.annotations = {}; + this.labels = {}; + 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]]; + } + + /** + * Automation name. + * @member {string} name + * @memberof google.cloud.deploy.v1.Automation + * @instance + */ + Automation.prototype.name = ""; + + /** + * Automation uid. + * @member {string} uid + * @memberof google.cloud.deploy.v1.Automation + * @instance + */ + Automation.prototype.uid = ""; + + /** + * Automation description. + * @member {string} description + * @memberof google.cloud.deploy.v1.Automation + * @instance + */ + Automation.prototype.description = ""; + + /** + * Automation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.Automation + * @instance + */ + Automation.prototype.createTime = null; /** - * Properties of a CreateRolloutRequest. - * @memberof google.cloud.deploy.v1 - * @interface ICreateRolloutRequest - * @property {string|null} [parent] CreateRolloutRequest parent - * @property {string|null} [rolloutId] CreateRolloutRequest rolloutId - * @property {google.cloud.deploy.v1.IRollout|null} [rollout] CreateRolloutRequest rollout - * @property {string|null} [requestId] CreateRolloutRequest requestId - * @property {boolean|null} [validateOnly] CreateRolloutRequest validateOnly - * @property {string|null} [startingPhaseId] CreateRolloutRequest startingPhaseId + * Automation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.Automation + * @instance */ + Automation.prototype.updateTime = null; /** - * Constructs a new CreateRolloutRequest. - * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateRolloutRequest. - * @implements ICreateRolloutRequest - * @constructor - * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set + * Automation annotations. + * @member {Object.} annotations + * @memberof google.cloud.deploy.v1.Automation + * @instance */ - function CreateRolloutRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Automation.prototype.annotations = $util.emptyObject; /** - * CreateRolloutRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * Automation labels. + * @member {Object.} labels + * @memberof google.cloud.deploy.v1.Automation * @instance */ - CreateRolloutRequest.prototype.parent = ""; + Automation.prototype.labels = $util.emptyObject; /** - * CreateRolloutRequest rolloutId. - * @member {string} rolloutId - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * Automation etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.Automation * @instance */ - CreateRolloutRequest.prototype.rolloutId = ""; + Automation.prototype.etag = ""; /** - * CreateRolloutRequest rollout. - * @member {google.cloud.deploy.v1.IRollout|null|undefined} rollout - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * Automation suspended. + * @member {boolean} suspended + * @memberof google.cloud.deploy.v1.Automation * @instance */ - CreateRolloutRequest.prototype.rollout = null; + Automation.prototype.suspended = false; /** - * CreateRolloutRequest requestId. - * @member {string} requestId - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * Automation serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.Automation * @instance */ - CreateRolloutRequest.prototype.requestId = ""; + Automation.prototype.serviceAccount = ""; /** - * CreateRolloutRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * Automation selector. + * @member {google.cloud.deploy.v1.IAutomationResourceSelector|null|undefined} selector + * @memberof google.cloud.deploy.v1.Automation * @instance */ - CreateRolloutRequest.prototype.validateOnly = false; + Automation.prototype.selector = null; /** - * CreateRolloutRequest startingPhaseId. - * @member {string} startingPhaseId - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * Automation rules. + * @member {Array.} rules + * @memberof google.cloud.deploy.v1.Automation * @instance */ - CreateRolloutRequest.prototype.startingPhaseId = ""; + Automation.prototype.rules = $util.emptyArray; /** - * Creates a new CreateRolloutRequest instance using the specified properties. + * Creates a new Automation instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static - * @param {google.cloud.deploy.v1.ICreateRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest instance + * @param {google.cloud.deploy.v1.IAutomation=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Automation} Automation instance */ - CreateRolloutRequest.create = function create(properties) { - return new CreateRolloutRequest(properties); + Automation.create = function create(properties) { + return new Automation(properties); }; /** - * Encodes the specified CreateRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * Encodes the specified Automation message. Does not implicitly {@link google.cloud.deploy.v1.Automation.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static - * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomation} message Automation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRolloutRequest.encode = function encode(message, writer) { + Automation.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.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - $root.google.cloud.deploy.v1.Rollout.encode(message.rollout, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.startingPhaseId != null && Object.hasOwnProperty.call(message, "startingPhaseId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.startingPhaseId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.suspended != null && Object.hasOwnProperty.call(message, "suspended")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.suspended); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.serviceAccount); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + $root.google.cloud.deploy.v1.AutomationResourceSelector.encode(message.selector, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.deploy.v1.AutomationRule.encode(message.rules[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateRolloutRequest.verify|verify} messages. + * Encodes the specified Automation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Automation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static - * @param {google.cloud.deploy.v1.ICreateRolloutRequest} message CreateRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomation} message Automation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + Automation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateRolloutRequest message from the specified reader or buffer. + * Decodes an Automation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @returns {google.cloud.deploy.v1.Automation} Automation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateRolloutRequest.decode = function decode(reader, length) { + Automation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Automation(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.rolloutId = reader.string(); + message.uid = reader.string(); break; } case 3: { - message.rollout = $root.google.cloud.deploy.v1.Rollout.decode(reader, reader.uint32()); + message.description = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 5: { - message.validateOnly = reader.bool(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; break; } case 7: { - message.startingPhaseId = reader.string(); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.etag = reader.string(); + break; + } + case 9: { + message.suspended = reader.bool(); + break; + } + case 10: { + message.serviceAccount = reader.string(); + break; + } + case 11: { + message.selector = $root.google.cloud.deploy.v1.AutomationResourceSelector.decode(reader, reader.uint32()); + break; + } + case 14: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.deploy.v1.AutomationRule.decode(reader, reader.uint32())); break; } default: @@ -22663,174 +32776,274 @@ }; /** - * Decodes a CreateRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes an Automation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @returns {google.cloud.deploy.v1.Automation} Automation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + Automation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateRolloutRequest message. + * Verifies an Automation message. * @function verify - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateRolloutRequest.verify = function verify(message) { + Automation.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.rolloutId != null && message.hasOwnProperty("rolloutId")) - if (!$util.isString(message.rolloutId)) - return "rolloutId: string expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) { - var error = $root.google.cloud.deploy.v1.Rollout.verify(message.rollout); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "rollout." + error; + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.suspended != null && message.hasOwnProperty("suspended")) + if (typeof message.suspended !== "boolean") + return "suspended: boolean expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.selector != null && message.hasOwnProperty("selector")) { + var error = $root.google.cloud.deploy.v1.AutomationResourceSelector.verify(message.selector); + if (error) + return "selector." + error; + } + 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.cloud.deploy.v1.AutomationRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.startingPhaseId != null && message.hasOwnProperty("startingPhaseId")) - if (!$util.isString(message.startingPhaseId)) - return "startingPhaseId: string expected"; return null; }; /** - * Creates a CreateRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Automation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateRolloutRequest} CreateRolloutRequest + * @returns {google.cloud.deploy.v1.Automation} Automation */ - CreateRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateRolloutRequest) + Automation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Automation) return object; - var message = new $root.google.cloud.deploy.v1.CreateRolloutRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.rolloutId != null) - message.rolloutId = String(object.rolloutId); - if (object.rollout != null) { - if (typeof object.rollout !== "object") - throw TypeError(".google.cloud.deploy.v1.CreateRolloutRequest.rollout: object expected"); - message.rollout = $root.google.cloud.deploy.v1.Rollout.fromObject(object.rollout); + var message = new $root.google.cloud.deploy.v1.Automation(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Automation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.Automation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.deploy.v1.Automation.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.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.deploy.v1.Automation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.suspended != null) + message.suspended = Boolean(object.suspended); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.selector != null) { + if (typeof object.selector !== "object") + throw TypeError(".google.cloud.deploy.v1.Automation.selector: object expected"); + message.selector = $root.google.cloud.deploy.v1.AutomationResourceSelector.fromObject(object.selector); + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.deploy.v1.Automation.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.Automation.rules: object expected"); + message.rules[i] = $root.google.cloud.deploy.v1.AutomationRule.fromObject(object.rules[i]); + } } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.startingPhaseId != null) - message.startingPhaseId = String(object.startingPhaseId); return message; }; /** - * Creates a plain object from a CreateRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from an Automation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static - * @param {google.cloud.deploy.v1.CreateRolloutRequest} message CreateRolloutRequest + * @param {google.cloud.deploy.v1.Automation} message Automation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateRolloutRequest.toObject = function toObject(message, options) { + Automation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.objects || options.defaults) { + object.annotations = {}; + object.labels = {}; + } if (options.defaults) { - object.parent = ""; - object.rolloutId = ""; - object.rollout = null; - object.requestId = ""; - object.validateOnly = false; - object.startingPhaseId = ""; + object.name = ""; + object.uid = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.suspended = false; + object.serviceAccount = ""; + object.selector = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.suspended != null && message.hasOwnProperty("suspended")) + object.suspended = message.suspended; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = $root.google.cloud.deploy.v1.AutomationResourceSelector.toObject(message.selector, options); + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.deploy.v1.AutomationRule.toObject(message.rules[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) - object.rolloutId = message.rolloutId; - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = $root.google.cloud.deploy.v1.Rollout.toObject(message.rollout, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.startingPhaseId != null && message.hasOwnProperty("startingPhaseId")) - object.startingPhaseId = message.startingPhaseId; return object; }; /** - * Converts this CreateRolloutRequest to JSON. + * Converts this Automation to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @instance * @returns {Object.} JSON object */ - CreateRolloutRequest.prototype.toJSON = function toJSON() { + Automation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateRolloutRequest + * Gets the default type url for Automation * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateRolloutRequest + * @memberof google.cloud.deploy.v1.Automation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Automation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Automation"; }; - return CreateRolloutRequest; + return Automation; })(); - v1.OperationMetadata = (function() { + v1.AutomationResourceSelector = (function() { /** - * Properties of an OperationMetadata. + * Properties of an AutomationResourceSelector. * @memberof google.cloud.deploy.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface IAutomationResourceSelector + * @property {Array.|null} [targets] AutomationResourceSelector targets */ /** - * Constructs a new OperationMetadata. + * Constructs a new AutomationResourceSelector. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents an AutomationResourceSelector. + * @implements IAutomationResourceSelector * @constructor - * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAutomationResourceSelector=} [properties] Properties to set */ - function OperationMetadata(properties) { + function AutomationResourceSelector(properties) { + this.targets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22838,159 +33051,78 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.deploy.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.deploy.v1.OperationMetadata + * AutomationResourceSelector targets. + * @member {Array.} targets + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @instance */ - OperationMetadata.prototype.apiVersion = ""; + AutomationResourceSelector.prototype.targets = $util.emptyArray; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new AutomationResourceSelector instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static - * @param {google.cloud.deploy.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.deploy.v1.IAutomationResourceSelector=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationResourceSelector} AutomationResourceSelector instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + AutomationResourceSelector.create = function create(properties) { + return new AutomationResourceSelector(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified AutomationResourceSelector message. Does not implicitly {@link google.cloud.deploy.v1.AutomationResourceSelector.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static - * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationResourceSelector} message AutomationResourceSelector message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + AutomationResourceSelector.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.cloud.deploy.v1.TargetAttribute.encode(message.targets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified AutomationResourceSelector message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationResourceSelector.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static - * @param {google.cloud.deploy.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationResourceSelector} message AutomationResourceSelector message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + AutomationResourceSelector.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes an AutomationResourceSelector message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.deploy.v1.AutomationResourceSelector} AutomationResourceSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + AutomationResourceSelector.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationResourceSelector(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.cloud.deploy.v1.TargetAttribute.decode(reader, reader.uint32())); break; } default: @@ -23002,182 +33134,141 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an AutomationResourceSelector message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.deploy.v1.AutomationResourceSelector} AutomationResourceSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + AutomationResourceSelector.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies an AutomationResourceSelector message. * @function verify - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + AutomationResourceSelector.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) { + var error = $root.google.cloud.deploy.v1.TargetAttribute.verify(message.targets[i]); + if (error) + return "targets." + error; + } } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AutomationResourceSelector message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.deploy.v1.AutomationResourceSelector} AutomationResourceSelector */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.OperationMetadata) + AutomationResourceSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationResourceSelector) return object; - var message = new $root.google.cloud.deploy.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.deploy.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.deploy.v1.AutomationResourceSelector(); + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.cloud.deploy.v1.AutomationResourceSelector.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationResourceSelector.targets: object expected"); + message.targets[i] = $root.google.cloud.deploy.v1.TargetAttribute.fromObject(object.targets[i]); + } } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an AutomationResourceSelector message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static - * @param {google.cloud.deploy.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.deploy.v1.AutomationResourceSelector} message AutomationResourceSelector * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + AutomationResourceSelector.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + if (options.arrays || options.defaults) + object.targets = []; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.cloud.deploy.v1.TargetAttribute.toObject(message.targets[j], options); } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this AutomationResourceSelector to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + AutomationResourceSelector.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for AutomationResourceSelector * @function getTypeUrl - * @memberof google.cloud.deploy.v1.OperationMetadata + * @memberof google.cloud.deploy.v1.AutomationResourceSelector * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AutomationResourceSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationResourceSelector"; }; - return OperationMetadata; + return AutomationResourceSelector; })(); - v1.ApproveRolloutRequest = (function() { + v1.AutomationRule = (function() { /** - * Properties of an ApproveRolloutRequest. + * Properties of an AutomationRule. * @memberof google.cloud.deploy.v1 - * @interface IApproveRolloutRequest - * @property {string|null} [name] ApproveRolloutRequest name - * @property {boolean|null} [approved] ApproveRolloutRequest approved + * @interface IAutomationRule + * @property {google.cloud.deploy.v1.IPromoteReleaseRule|null} [promoteReleaseRule] AutomationRule promoteReleaseRule + * @property {google.cloud.deploy.v1.IAdvanceRolloutRule|null} [advanceRolloutRule] AutomationRule advanceRolloutRule + * @property {google.cloud.deploy.v1.IRepairRolloutRule|null} [repairRolloutRule] AutomationRule repairRolloutRule */ /** - * Constructs a new ApproveRolloutRequest. + * Constructs a new AutomationRule. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an ApproveRolloutRequest. - * @implements IApproveRolloutRequest + * @classdesc Represents an AutomationRule. + * @implements IAutomationRule * @constructor - * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAutomationRule=} [properties] Properties to set */ - function ApproveRolloutRequest(properties) { + function AutomationRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23185,89 +33276,117 @@ } /** - * ApproveRolloutRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * AutomationRule promoteReleaseRule. + * @member {google.cloud.deploy.v1.IPromoteReleaseRule|null|undefined} promoteReleaseRule + * @memberof google.cloud.deploy.v1.AutomationRule * @instance */ - ApproveRolloutRequest.prototype.name = ""; + AutomationRule.prototype.promoteReleaseRule = null; /** - * ApproveRolloutRequest approved. - * @member {boolean} approved - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * AutomationRule advanceRolloutRule. + * @member {google.cloud.deploy.v1.IAdvanceRolloutRule|null|undefined} advanceRolloutRule + * @memberof google.cloud.deploy.v1.AutomationRule * @instance */ - ApproveRolloutRequest.prototype.approved = false; + AutomationRule.prototype.advanceRolloutRule = null; /** - * Creates a new ApproveRolloutRequest instance using the specified properties. + * AutomationRule repairRolloutRule. + * @member {google.cloud.deploy.v1.IRepairRolloutRule|null|undefined} repairRolloutRule + * @memberof google.cloud.deploy.v1.AutomationRule + * @instance + */ + AutomationRule.prototype.repairRolloutRule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutomationRule rule. + * @member {"promoteReleaseRule"|"advanceRolloutRule"|"repairRolloutRule"|undefined} rule + * @memberof google.cloud.deploy.v1.AutomationRule + * @instance + */ + Object.defineProperty(AutomationRule.prototype, "rule", { + get: $util.oneOfGetter($oneOfFields = ["promoteReleaseRule", "advanceRolloutRule", "repairRolloutRule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutomationRule instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static - * @param {google.cloud.deploy.v1.IApproveRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest instance + * @param {google.cloud.deploy.v1.IAutomationRule=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationRule} AutomationRule instance */ - ApproveRolloutRequest.create = function create(properties) { - return new ApproveRolloutRequest(properties); + AutomationRule.create = function create(properties) { + return new AutomationRule(properties); }; /** - * Encodes the specified ApproveRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * Encodes the specified AutomationRule message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRule.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static - * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationRule} message AutomationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutRequest.encode = function encode(message, writer) { + AutomationRule.encode = function encode(message, writer) { 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.approved != null && Object.hasOwnProperty.call(message, "approved")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.approved); + if (message.promoteReleaseRule != null && Object.hasOwnProperty.call(message, "promoteReleaseRule")) + $root.google.cloud.deploy.v1.PromoteReleaseRule.encode(message.promoteReleaseRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.advanceRolloutRule != null && Object.hasOwnProperty.call(message, "advanceRolloutRule")) + $root.google.cloud.deploy.v1.AdvanceRolloutRule.encode(message.advanceRolloutRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repairRolloutRule != null && Object.hasOwnProperty.call(message, "repairRolloutRule")) + $root.google.cloud.deploy.v1.RepairRolloutRule.encode(message.repairRolloutRule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ApproveRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutRequest.verify|verify} messages. + * Encodes the specified AutomationRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static - * @param {google.cloud.deploy.v1.IApproveRolloutRequest} message ApproveRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationRule} message AutomationRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + AutomationRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApproveRolloutRequest message from the specified reader or buffer. + * Decodes an AutomationRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @returns {google.cloud.deploy.v1.AutomationRule} AutomationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutRequest.decode = function decode(reader, length) { + AutomationRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.promoteReleaseRule = $root.google.cloud.deploy.v1.PromoteReleaseRule.decode(reader, reader.uint32()); break; } case 2: { - message.approved = reader.bool(); + message.advanceRolloutRule = $root.google.cloud.deploy.v1.AdvanceRolloutRule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repairRolloutRule = $root.google.cloud.deploy.v1.RepairRolloutRule.decode(reader, reader.uint32()); break; } default: @@ -23279,130 +33398,176 @@ }; /** - * Decodes an ApproveRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes an AutomationRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @returns {google.cloud.deploy.v1.AutomationRule} AutomationRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + AutomationRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApproveRolloutRequest message. + * Verifies an AutomationRule message. * @function verify - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApproveRolloutRequest.verify = function verify(message) { + AutomationRule.verify = function verify(message) { if (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.approved != null && message.hasOwnProperty("approved")) - if (typeof message.approved !== "boolean") - return "approved: boolean expected"; + var properties = {}; + if (message.promoteReleaseRule != null && message.hasOwnProperty("promoteReleaseRule")) { + properties.rule = 1; + { + var error = $root.google.cloud.deploy.v1.PromoteReleaseRule.verify(message.promoteReleaseRule); + if (error) + return "promoteReleaseRule." + error; + } + } + if (message.advanceRolloutRule != null && message.hasOwnProperty("advanceRolloutRule")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.cloud.deploy.v1.AdvanceRolloutRule.verify(message.advanceRolloutRule); + if (error) + return "advanceRolloutRule." + error; + } + } + if (message.repairRolloutRule != null && message.hasOwnProperty("repairRolloutRule")) { + if (properties.rule === 1) + return "rule: multiple values"; + properties.rule = 1; + { + var error = $root.google.cloud.deploy.v1.RepairRolloutRule.verify(message.repairRolloutRule); + if (error) + return "repairRolloutRule." + error; + } + } return null; }; /** - * Creates an ApproveRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AutomationRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ApproveRolloutRequest} ApproveRolloutRequest + * @returns {google.cloud.deploy.v1.AutomationRule} AutomationRule */ - ApproveRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutRequest) + AutomationRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationRule) return object; - var message = new $root.google.cloud.deploy.v1.ApproveRolloutRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.approved != null) - message.approved = Boolean(object.approved); + var message = new $root.google.cloud.deploy.v1.AutomationRule(); + if (object.promoteReleaseRule != null) { + if (typeof object.promoteReleaseRule !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRule.promoteReleaseRule: object expected"); + message.promoteReleaseRule = $root.google.cloud.deploy.v1.PromoteReleaseRule.fromObject(object.promoteReleaseRule); + } + if (object.advanceRolloutRule != null) { + if (typeof object.advanceRolloutRule !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRule.advanceRolloutRule: object expected"); + message.advanceRolloutRule = $root.google.cloud.deploy.v1.AdvanceRolloutRule.fromObject(object.advanceRolloutRule); + } + if (object.repairRolloutRule != null) { + if (typeof object.repairRolloutRule !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRule.repairRolloutRule: object expected"); + message.repairRolloutRule = $root.google.cloud.deploy.v1.RepairRolloutRule.fromObject(object.repairRolloutRule); + } return message; }; /** - * Creates a plain object from an ApproveRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from an AutomationRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static - * @param {google.cloud.deploy.v1.ApproveRolloutRequest} message ApproveRolloutRequest + * @param {google.cloud.deploy.v1.AutomationRule} message AutomationRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApproveRolloutRequest.toObject = function toObject(message, options) { + AutomationRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.approved = false; + if (message.promoteReleaseRule != null && message.hasOwnProperty("promoteReleaseRule")) { + object.promoteReleaseRule = $root.google.cloud.deploy.v1.PromoteReleaseRule.toObject(message.promoteReleaseRule, options); + if (options.oneofs) + object.rule = "promoteReleaseRule"; + } + if (message.advanceRolloutRule != null && message.hasOwnProperty("advanceRolloutRule")) { + object.advanceRolloutRule = $root.google.cloud.deploy.v1.AdvanceRolloutRule.toObject(message.advanceRolloutRule, options); + if (options.oneofs) + object.rule = "advanceRolloutRule"; + } + if (message.repairRolloutRule != null && message.hasOwnProperty("repairRolloutRule")) { + object.repairRolloutRule = $root.google.cloud.deploy.v1.RepairRolloutRule.toObject(message.repairRolloutRule, options); + if (options.oneofs) + object.rule = "repairRolloutRule"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.approved != null && message.hasOwnProperty("approved")) - object.approved = message.approved; return object; }; /** - * Converts this ApproveRolloutRequest to JSON. + * Converts this AutomationRule to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @instance * @returns {Object.} JSON object */ - ApproveRolloutRequest.prototype.toJSON = function toJSON() { + AutomationRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ApproveRolloutRequest + * Gets the default type url for AutomationRule * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ApproveRolloutRequest + * @memberof google.cloud.deploy.v1.AutomationRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ApproveRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AutomationRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationRule"; }; - return ApproveRolloutRequest; + return AutomationRule; })(); - v1.ApproveRolloutResponse = (function() { + v1.PromoteReleaseRule = (function() { /** - * Properties of an ApproveRolloutResponse. + * Properties of a PromoteReleaseRule. * @memberof google.cloud.deploy.v1 - * @interface IApproveRolloutResponse + * @interface IPromoteReleaseRule + * @property {string|null} [id] PromoteReleaseRule id + * @property {google.protobuf.IDuration|null} [wait] PromoteReleaseRule wait + * @property {string|null} [destinationTargetId] PromoteReleaseRule destinationTargetId + * @property {google.cloud.deploy.v1.IAutomationRuleCondition|null} [condition] PromoteReleaseRule condition + * @property {string|null} [destinationPhase] PromoteReleaseRule destinationPhase */ /** - * Constructs a new ApproveRolloutResponse. + * Constructs a new PromoteReleaseRule. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an ApproveRolloutResponse. - * @implements IApproveRolloutResponse + * @classdesc Represents a PromoteReleaseRule. + * @implements IPromoteReleaseRule * @constructor - * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPromoteReleaseRule=} [properties] Properties to set */ - function ApproveRolloutResponse(properties) { + function PromoteReleaseRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23410,63 +33575,133 @@ } /** - * Creates a new ApproveRolloutResponse instance using the specified properties. + * PromoteReleaseRule id. + * @member {string} id + * @memberof google.cloud.deploy.v1.PromoteReleaseRule + * @instance + */ + PromoteReleaseRule.prototype.id = ""; + + /** + * PromoteReleaseRule wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.PromoteReleaseRule + * @instance + */ + PromoteReleaseRule.prototype.wait = null; + + /** + * PromoteReleaseRule destinationTargetId. + * @member {string} destinationTargetId + * @memberof google.cloud.deploy.v1.PromoteReleaseRule + * @instance + */ + PromoteReleaseRule.prototype.destinationTargetId = ""; + + /** + * PromoteReleaseRule condition. + * @member {google.cloud.deploy.v1.IAutomationRuleCondition|null|undefined} condition + * @memberof google.cloud.deploy.v1.PromoteReleaseRule + * @instance + */ + PromoteReleaseRule.prototype.condition = null; + + /** + * PromoteReleaseRule destinationPhase. + * @member {string} destinationPhase + * @memberof google.cloud.deploy.v1.PromoteReleaseRule + * @instance + */ + PromoteReleaseRule.prototype.destinationPhase = ""; + + /** + * Creates a new PromoteReleaseRule instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static - * @param {google.cloud.deploy.v1.IApproveRolloutResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse instance + * @param {google.cloud.deploy.v1.IPromoteReleaseRule=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PromoteReleaseRule} PromoteReleaseRule instance */ - ApproveRolloutResponse.create = function create(properties) { - return new ApproveRolloutResponse(properties); + PromoteReleaseRule.create = function create(properties) { + return new PromoteReleaseRule(properties); }; /** - * Encodes the specified ApproveRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * Encodes the specified PromoteReleaseRule message. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseRule.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static - * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IPromoteReleaseRule} message PromoteReleaseRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutResponse.encode = function encode(message, writer) { + PromoteReleaseRule.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.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.cloud.deploy.v1.AutomationRuleCondition.encode(message.condition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.destinationTargetId != null && Object.hasOwnProperty.call(message, "destinationTargetId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationTargetId); + if (message.destinationPhase != null && Object.hasOwnProperty.call(message, "destinationPhase")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.destinationPhase); return writer; }; /** - * Encodes the specified ApproveRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ApproveRolloutResponse.verify|verify} messages. + * Encodes the specified PromoteReleaseRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static - * @param {google.cloud.deploy.v1.IApproveRolloutResponse} message ApproveRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IPromoteReleaseRule} message PromoteReleaseRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ApproveRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { + PromoteReleaseRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ApproveRolloutResponse message from the specified reader or buffer. + * Decodes a PromoteReleaseRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @returns {google.cloud.deploy.v1.PromoteReleaseRule} PromoteReleaseRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutResponse.decode = function decode(reader, length) { + PromoteReleaseRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PromoteReleaseRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + message.destinationTargetId = reader.string(); + break; + } + case 5: { + message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.decode(reader, reader.uint32()); + break; + } + case 8: { + message.destinationPhase = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23476,110 +33711,169 @@ }; /** - * Decodes an ApproveRolloutResponse message from the specified reader or buffer, length delimited. + * Decodes a PromoteReleaseRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @returns {google.cloud.deploy.v1.PromoteReleaseRule} PromoteReleaseRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ApproveRolloutResponse.decodeDelimited = function decodeDelimited(reader) { + PromoteReleaseRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ApproveRolloutResponse message. + * Verifies a PromoteReleaseRule message. * @function verify - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ApproveRolloutResponse.verify = function verify(message) { + PromoteReleaseRule.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.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; + } + if (message.destinationTargetId != null && message.hasOwnProperty("destinationTargetId")) + if (!$util.isString(message.destinationTargetId)) + return "destinationTargetId: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.cloud.deploy.v1.AutomationRuleCondition.verify(message.condition); + if (error) + return "condition." + error; + } + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + if (!$util.isString(message.destinationPhase)) + return "destinationPhase: string expected"; return null; }; /** - * Creates an ApproveRolloutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PromoteReleaseRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ApproveRolloutResponse} ApproveRolloutResponse + * @returns {google.cloud.deploy.v1.PromoteReleaseRule} PromoteReleaseRule */ - ApproveRolloutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ApproveRolloutResponse) + PromoteReleaseRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PromoteReleaseRule) return object; - return new $root.google.cloud.deploy.v1.ApproveRolloutResponse(); + var message = new $root.google.cloud.deploy.v1.PromoteReleaseRule(); + if (object.id != null) + message.id = String(object.id); + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.PromoteReleaseRule.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); + } + if (object.destinationTargetId != null) + message.destinationTargetId = String(object.destinationTargetId); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.cloud.deploy.v1.PromoteReleaseRule.condition: object expected"); + message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.fromObject(object.condition); + } + if (object.destinationPhase != null) + message.destinationPhase = String(object.destinationPhase); + return message; }; /** - * Creates a plain object from an ApproveRolloutResponse message. Also converts values to other types if specified. + * Creates a plain object from a PromoteReleaseRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static - * @param {google.cloud.deploy.v1.ApproveRolloutResponse} message ApproveRolloutResponse + * @param {google.cloud.deploy.v1.PromoteReleaseRule} message PromoteReleaseRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ApproveRolloutResponse.toObject = function toObject() { - return {}; + PromoteReleaseRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.wait = null; + object.condition = null; + object.destinationTargetId = ""; + object.destinationPhase = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.toObject(message.condition, options); + if (message.destinationTargetId != null && message.hasOwnProperty("destinationTargetId")) + object.destinationTargetId = message.destinationTargetId; + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + object.destinationPhase = message.destinationPhase; + return object; }; /** - * Converts this ApproveRolloutResponse to JSON. + * Converts this PromoteReleaseRule to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @instance * @returns {Object.} JSON object */ - ApproveRolloutResponse.prototype.toJSON = function toJSON() { + PromoteReleaseRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ApproveRolloutResponse + * Gets the default type url for PromoteReleaseRule * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ApproveRolloutResponse + * @memberof google.cloud.deploy.v1.PromoteReleaseRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ApproveRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PromoteReleaseRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ApproveRolloutResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PromoteReleaseRule"; }; - return ApproveRolloutResponse; + return PromoteReleaseRule; })(); - v1.AdvanceRolloutRequest = (function() { + v1.AdvanceRolloutRule = (function() { /** - * Properties of an AdvanceRolloutRequest. + * Properties of an AdvanceRolloutRule. * @memberof google.cloud.deploy.v1 - * @interface IAdvanceRolloutRequest - * @property {string|null} [name] AdvanceRolloutRequest name - * @property {string|null} [phaseId] AdvanceRolloutRequest phaseId + * @interface IAdvanceRolloutRule + * @property {string|null} [id] AdvanceRolloutRule id + * @property {Array.|null} [sourcePhases] AdvanceRolloutRule sourcePhases + * @property {google.protobuf.IDuration|null} [wait] AdvanceRolloutRule wait + * @property {google.cloud.deploy.v1.IAutomationRuleCondition|null} [condition] AdvanceRolloutRule condition */ /** - * Constructs a new AdvanceRolloutRequest. + * Constructs a new AdvanceRolloutRule. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AdvanceRolloutRequest. - * @implements IAdvanceRolloutRequest + * @classdesc Represents an AdvanceRolloutRule. + * @implements IAdvanceRolloutRule * @constructor - * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAdvanceRolloutRule=} [properties] Properties to set */ - function AdvanceRolloutRequest(properties) { + function AdvanceRolloutRule(properties) { + this.sourcePhases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23587,89 +33881,120 @@ } /** - * AdvanceRolloutRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * AdvanceRolloutRule id. + * @member {string} id + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @instance */ - AdvanceRolloutRequest.prototype.name = ""; + AdvanceRolloutRule.prototype.id = ""; /** - * AdvanceRolloutRequest phaseId. - * @member {string} phaseId - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * AdvanceRolloutRule sourcePhases. + * @member {Array.} sourcePhases + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @instance */ - AdvanceRolloutRequest.prototype.phaseId = ""; + AdvanceRolloutRule.prototype.sourcePhases = $util.emptyArray; /** - * Creates a new AdvanceRolloutRequest instance using the specified properties. + * AdvanceRolloutRule wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule + * @instance + */ + AdvanceRolloutRule.prototype.wait = null; + + /** + * AdvanceRolloutRule condition. + * @member {google.cloud.deploy.v1.IAutomationRuleCondition|null|undefined} condition + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule + * @instance + */ + AdvanceRolloutRule.prototype.condition = null; + + /** + * Creates a new AdvanceRolloutRule instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static - * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest instance + * @param {google.cloud.deploy.v1.IAdvanceRolloutRule=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AdvanceRolloutRule} AdvanceRolloutRule instance */ - AdvanceRolloutRequest.create = function create(properties) { - return new AdvanceRolloutRequest(properties); + AdvanceRolloutRule.create = function create(properties) { + return new AdvanceRolloutRule(properties); }; /** - * Encodes the specified AdvanceRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRequest.verify|verify} messages. + * Encodes the specified AdvanceRolloutRule message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRule.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static - * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} message AdvanceRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutRule} message AdvanceRolloutRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceRolloutRequest.encode = function encode(message, writer) { + AdvanceRolloutRule.encode = function encode(message, writer) { 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.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.cloud.deploy.v1.AutomationRuleCondition.encode(message.condition, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sourcePhases != null && message.sourcePhases.length) + for (var i = 0; i < message.sourcePhases.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourcePhases[i]); return writer; }; /** - * Encodes the specified AdvanceRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRequest.verify|verify} messages. + * Encodes the specified AdvanceRolloutRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static - * @param {google.cloud.deploy.v1.IAdvanceRolloutRequest} message AdvanceRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutRule} message AdvanceRolloutRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + AdvanceRolloutRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdvanceRolloutRequest message from the specified reader or buffer. + * Decodes an AdvanceRolloutRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest + * @returns {google.cloud.deploy.v1.AdvanceRolloutRule} AdvanceRolloutRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceRolloutRequest.decode = function decode(reader, length) { + AdvanceRolloutRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceRolloutRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.id = reader.string(); break; } - case 2: { - message.phaseId = reader.string(); + case 6: { + if (!(message.sourcePhases && message.sourcePhases.length)) + message.sourcePhases = []; + message.sourcePhases.push(reader.string()); + break; + } + case 3: { + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.decode(reader, reader.uint32()); break; } default: @@ -23681,130 +34006,177 @@ }; /** - * Decodes an AdvanceRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes an AdvanceRolloutRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest + * @returns {google.cloud.deploy.v1.AdvanceRolloutRule} AdvanceRolloutRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + AdvanceRolloutRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdvanceRolloutRequest message. + * Verifies an AdvanceRolloutRule message. * @function verify - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdvanceRolloutRequest.verify = function verify(message) { + AdvanceRolloutRule.verify = function verify(message) { if (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.phaseId != null && message.hasOwnProperty("phaseId")) - if (!$util.isString(message.phaseId)) - return "phaseId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.sourcePhases != null && message.hasOwnProperty("sourcePhases")) { + if (!Array.isArray(message.sourcePhases)) + return "sourcePhases: array expected"; + for (var i = 0; i < message.sourcePhases.length; ++i) + if (!$util.isString(message.sourcePhases[i])) + return "sourcePhases: string[] expected"; + } + if (message.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.cloud.deploy.v1.AutomationRuleCondition.verify(message.condition); + if (error) + return "condition." + error; + } return null; }; /** - * Creates an AdvanceRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AdvanceRolloutRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AdvanceRolloutRequest} AdvanceRolloutRequest + * @returns {google.cloud.deploy.v1.AdvanceRolloutRule} AdvanceRolloutRule */ - AdvanceRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AdvanceRolloutRequest) + AdvanceRolloutRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AdvanceRolloutRule) return object; - var message = new $root.google.cloud.deploy.v1.AdvanceRolloutRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.phaseId != null) - message.phaseId = String(object.phaseId); + var message = new $root.google.cloud.deploy.v1.AdvanceRolloutRule(); + if (object.id != null) + message.id = String(object.id); + if (object.sourcePhases) { + if (!Array.isArray(object.sourcePhases)) + throw TypeError(".google.cloud.deploy.v1.AdvanceRolloutRule.sourcePhases: array expected"); + message.sourcePhases = []; + for (var i = 0; i < object.sourcePhases.length; ++i) + message.sourcePhases[i] = String(object.sourcePhases[i]); + } + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.AdvanceRolloutRule.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.cloud.deploy.v1.AdvanceRolloutRule.condition: object expected"); + message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.fromObject(object.condition); + } return message; }; /** - * Creates a plain object from an AdvanceRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from an AdvanceRolloutRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static - * @param {google.cloud.deploy.v1.AdvanceRolloutRequest} message AdvanceRolloutRequest + * @param {google.cloud.deploy.v1.AdvanceRolloutRule} message AdvanceRolloutRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdvanceRolloutRequest.toObject = function toObject(message, options) { + AdvanceRolloutRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sourcePhases = []; if (options.defaults) { - object.name = ""; - object.phaseId = ""; + object.id = ""; + object.wait = null; + object.condition = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.toObject(message.condition, options); + if (message.sourcePhases && message.sourcePhases.length) { + object.sourcePhases = []; + for (var j = 0; j < message.sourcePhases.length; ++j) + object.sourcePhases[j] = message.sourcePhases[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - object.phaseId = message.phaseId; return object; }; /** - * Converts this AdvanceRolloutRequest to JSON. + * Converts this AdvanceRolloutRule to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @instance * @returns {Object.} JSON object */ - AdvanceRolloutRequest.prototype.toJSON = function toJSON() { + AdvanceRolloutRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdvanceRolloutRequest + * Gets the default type url for AdvanceRolloutRule * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AdvanceRolloutRequest + * @memberof google.cloud.deploy.v1.AdvanceRolloutRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdvanceRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvanceRolloutRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceRolloutRule"; }; - return AdvanceRolloutRequest; + return AdvanceRolloutRule; })(); - v1.AdvanceRolloutResponse = (function() { + v1.RepairRolloutRule = (function() { /** - * Properties of an AdvanceRolloutResponse. + * Properties of a RepairRolloutRule. * @memberof google.cloud.deploy.v1 - * @interface IAdvanceRolloutResponse + * @interface IRepairRolloutRule + * @property {string|null} [id] RepairRolloutRule id + * @property {Array.|null} [sourcePhases] RepairRolloutRule sourcePhases + * @property {Array.|null} [jobs] RepairRolloutRule jobs + * @property {Array.|null} [repairModes] RepairRolloutRule repairModes + * @property {google.cloud.deploy.v1.IAutomationRuleCondition|null} [condition] RepairRolloutRule condition */ /** - * Constructs a new AdvanceRolloutResponse. + * Constructs a new RepairRolloutRule. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AdvanceRolloutResponse. - * @implements IAdvanceRolloutResponse + * @classdesc Represents a RepairRolloutRule. + * @implements IRepairRolloutRule * @constructor - * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRepairRolloutRule=} [properties] Properties to set */ - function AdvanceRolloutResponse(properties) { + function RepairRolloutRule(properties) { + this.sourcePhases = []; + this.jobs = []; + this.repairModes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23812,63 +34184,142 @@ } /** - * Creates a new AdvanceRolloutResponse instance using the specified properties. + * RepairRolloutRule id. + * @member {string} id + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.id = ""; + + /** + * RepairRolloutRule sourcePhases. + * @member {Array.} sourcePhases + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.sourcePhases = $util.emptyArray; + + /** + * RepairRolloutRule jobs. + * @member {Array.} jobs + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.jobs = $util.emptyArray; + + /** + * RepairRolloutRule repairModes. + * @member {Array.} repairModes + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.repairModes = $util.emptyArray; + + /** + * RepairRolloutRule condition. + * @member {google.cloud.deploy.v1.IAutomationRuleCondition|null|undefined} condition + * @memberof google.cloud.deploy.v1.RepairRolloutRule + * @instance + */ + RepairRolloutRule.prototype.condition = null; + + /** + * Creates a new RepairRolloutRule instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static - * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse instance + * @param {google.cloud.deploy.v1.IRepairRolloutRule=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RepairRolloutRule} RepairRolloutRule instance */ - AdvanceRolloutResponse.create = function create(properties) { - return new AdvanceRolloutResponse(properties); + RepairRolloutRule.create = function create(properties) { + return new RepairRolloutRule(properties); }; /** - * Encodes the specified AdvanceRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutResponse.verify|verify} messages. + * Encodes the specified RepairRolloutRule message. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutRule.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static - * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse} message AdvanceRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairRolloutRule} message RepairRolloutRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceRolloutResponse.encode = function encode(message, writer) { + RepairRolloutRule.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.sourcePhases != null && message.sourcePhases.length) + for (var i = 0; i < message.sourcePhases.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourcePhases[i]); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobs[i]); + if (message.repairModes != null && message.repairModes.length) + for (var i = 0; i < message.repairModes.length; ++i) + $root.google.cloud.deploy.v1.RepairMode.encode(message.repairModes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.cloud.deploy.v1.AutomationRuleCondition.encode(message.condition, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified AdvanceRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutResponse.verify|verify} messages. + * Encodes the specified RepairRolloutRule message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static - * @param {google.cloud.deploy.v1.IAdvanceRolloutResponse} message AdvanceRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairRolloutRule} message RepairRolloutRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { + RepairRolloutRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdvanceRolloutResponse message from the specified reader or buffer. + * Decodes a RepairRolloutRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse + * @returns {google.cloud.deploy.v1.RepairRolloutRule} RepairRolloutRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceRolloutResponse.decode = function decode(reader, length) { + RepairRolloutRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceRolloutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RepairRolloutRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.sourcePhases && message.sourcePhases.length)) + message.sourcePhases = []; + message.sourcePhases.push(reader.string()); + break; + } + case 3: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push(reader.string()); + break; + } + case 4: { + if (!(message.repairModes && message.repairModes.length)) + message.repairModes = []; + message.repairModes.push($root.google.cloud.deploy.v1.RepairMode.decode(reader, reader.uint32())); + break; + } + case 6: { + message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23878,109 +34329,204 @@ }; /** - * Decodes an AdvanceRolloutResponse message from the specified reader or buffer, length delimited. + * Decodes a RepairRolloutRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse + * @returns {google.cloud.deploy.v1.RepairRolloutRule} RepairRolloutRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceRolloutResponse.decodeDelimited = function decodeDelimited(reader) { + RepairRolloutRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdvanceRolloutResponse message. + * Verifies a RepairRolloutRule message. * @function verify - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdvanceRolloutResponse.verify = function verify(message) { + RepairRolloutRule.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.sourcePhases != null && message.hasOwnProperty("sourcePhases")) { + if (!Array.isArray(message.sourcePhases)) + return "sourcePhases: array expected"; + for (var i = 0; i < message.sourcePhases.length; ++i) + if (!$util.isString(message.sourcePhases[i])) + return "sourcePhases: string[] expected"; + } + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) + if (!$util.isString(message.jobs[i])) + return "jobs: string[] expected"; + } + if (message.repairModes != null && message.hasOwnProperty("repairModes")) { + if (!Array.isArray(message.repairModes)) + return "repairModes: array expected"; + for (var i = 0; i < message.repairModes.length; ++i) { + var error = $root.google.cloud.deploy.v1.RepairMode.verify(message.repairModes[i]); + if (error) + return "repairModes." + error; + } + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.cloud.deploy.v1.AutomationRuleCondition.verify(message.condition); + if (error) + return "condition." + error; + } return null; }; /** - * Creates an AdvanceRolloutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RepairRolloutRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AdvanceRolloutResponse} AdvanceRolloutResponse + * @returns {google.cloud.deploy.v1.RepairRolloutRule} RepairRolloutRule */ - AdvanceRolloutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AdvanceRolloutResponse) + RepairRolloutRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RepairRolloutRule) return object; - return new $root.google.cloud.deploy.v1.AdvanceRolloutResponse(); + var message = new $root.google.cloud.deploy.v1.RepairRolloutRule(); + if (object.id != null) + message.id = String(object.id); + if (object.sourcePhases) { + if (!Array.isArray(object.sourcePhases)) + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.sourcePhases: array expected"); + message.sourcePhases = []; + for (var i = 0; i < object.sourcePhases.length; ++i) + message.sourcePhases[i] = String(object.sourcePhases[i]); + } + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) + message.jobs[i] = String(object.jobs[i]); + } + if (object.repairModes) { + if (!Array.isArray(object.repairModes)) + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.repairModes: array expected"); + message.repairModes = []; + for (var i = 0; i < object.repairModes.length; ++i) { + if (typeof object.repairModes[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.repairModes: object expected"); + message.repairModes[i] = $root.google.cloud.deploy.v1.RepairMode.fromObject(object.repairModes[i]); + } + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairRolloutRule.condition: object expected"); + message.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.fromObject(object.condition); + } + return message; }; /** - * Creates a plain object from an AdvanceRolloutResponse message. Also converts values to other types if specified. + * Creates a plain object from a RepairRolloutRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static - * @param {google.cloud.deploy.v1.AdvanceRolloutResponse} message AdvanceRolloutResponse + * @param {google.cloud.deploy.v1.RepairRolloutRule} message RepairRolloutRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdvanceRolloutResponse.toObject = function toObject() { - return {}; + RepairRolloutRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sourcePhases = []; + object.jobs = []; + object.repairModes = []; + } + if (options.defaults) { + object.id = ""; + object.condition = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.sourcePhases && message.sourcePhases.length) { + object.sourcePhases = []; + for (var j = 0; j < message.sourcePhases.length; ++j) + object.sourcePhases[j] = message.sourcePhases[j]; + } + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = message.jobs[j]; + } + if (message.repairModes && message.repairModes.length) { + object.repairModes = []; + for (var j = 0; j < message.repairModes.length; ++j) + object.repairModes[j] = $root.google.cloud.deploy.v1.RepairMode.toObject(message.repairModes[j], options); + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.cloud.deploy.v1.AutomationRuleCondition.toObject(message.condition, options); + return object; }; /** - * Converts this AdvanceRolloutResponse to JSON. + * Converts this RepairRolloutRule to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @instance * @returns {Object.} JSON object */ - AdvanceRolloutResponse.prototype.toJSON = function toJSON() { + RepairRolloutRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdvanceRolloutResponse + * Gets the default type url for RepairRolloutRule * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AdvanceRolloutResponse + * @memberof google.cloud.deploy.v1.RepairRolloutRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdvanceRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RepairRolloutRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceRolloutResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RepairRolloutRule"; }; - return AdvanceRolloutResponse; + return RepairRolloutRule; })(); - v1.CancelRolloutRequest = (function() { + v1.RepairMode = (function() { /** - * Properties of a CancelRolloutRequest. + * Properties of a RepairMode. * @memberof google.cloud.deploy.v1 - * @interface ICancelRolloutRequest - * @property {string|null} [name] CancelRolloutRequest name + * @interface IRepairMode + * @property {google.cloud.deploy.v1.IRetry|null} [retry] RepairMode retry + * @property {google.cloud.deploy.v1.IRollback|null} [rollback] RepairMode rollback */ /** - * Constructs a new CancelRolloutRequest. + * Constructs a new RepairMode. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CancelRolloutRequest. - * @implements ICancelRolloutRequest + * @classdesc Represents a RepairMode. + * @implements IRepairMode * @constructor - * @param {google.cloud.deploy.v1.ICancelRolloutRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRepairMode=} [properties] Properties to set */ - function CancelRolloutRequest(properties) { + function RepairMode(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23988,75 +34534,103 @@ } /** - * CancelRolloutRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * RepairMode retry. + * @member {google.cloud.deploy.v1.IRetry|null|undefined} retry + * @memberof google.cloud.deploy.v1.RepairMode * @instance */ - CancelRolloutRequest.prototype.name = ""; + RepairMode.prototype.retry = null; /** - * Creates a new CancelRolloutRequest instance using the specified properties. + * RepairMode rollback. + * @member {google.cloud.deploy.v1.IRollback|null|undefined} rollback + * @memberof google.cloud.deploy.v1.RepairMode + * @instance + */ + RepairMode.prototype.rollback = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RepairMode mode. + * @member {"retry"|"rollback"|undefined} mode + * @memberof google.cloud.deploy.v1.RepairMode + * @instance + */ + Object.defineProperty(RepairMode.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["retry", "rollback"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepairMode instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static - * @param {google.cloud.deploy.v1.ICancelRolloutRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest instance + * @param {google.cloud.deploy.v1.IRepairMode=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RepairMode} RepairMode instance */ - CancelRolloutRequest.create = function create(properties) { - return new CancelRolloutRequest(properties); + RepairMode.create = function create(properties) { + return new RepairMode(properties); }; /** - * Encodes the specified CancelRolloutRequest message. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutRequest.verify|verify} messages. + * Encodes the specified RepairMode message. Does not implicitly {@link google.cloud.deploy.v1.RepairMode.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static - * @param {google.cloud.deploy.v1.ICancelRolloutRequest} message CancelRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairMode} message RepairMode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelRolloutRequest.encode = function encode(message, writer) { + RepairMode.encode = function encode(message, writer) { 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.retry != null && Object.hasOwnProperty.call(message, "retry")) + $root.google.cloud.deploy.v1.Retry.encode(message.retry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rollback != null && Object.hasOwnProperty.call(message, "rollback")) + $root.google.cloud.deploy.v1.Rollback.encode(message.rollback, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CancelRolloutRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutRequest.verify|verify} messages. + * Encodes the specified RepairMode message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairMode.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static - * @param {google.cloud.deploy.v1.ICancelRolloutRequest} message CancelRolloutRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairMode} message RepairMode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelRolloutRequest.encodeDelimited = function encodeDelimited(message, writer) { + RepairMode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelRolloutRequest message from the specified reader or buffer. + * Decodes a RepairMode message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest + * @returns {google.cloud.deploy.v1.RepairMode} RepairMode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelRolloutRequest.decode = function decode(reader, length) { + RepairMode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CancelRolloutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RepairMode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.retry = $root.google.cloud.deploy.v1.Retry.decode(reader, reader.uint32()); + break; + } + case 2: { + message.rollback = $root.google.cloud.deploy.v1.Rollback.decode(reader, reader.uint32()); break; } default: @@ -24068,121 +34642,154 @@ }; /** - * Decodes a CancelRolloutRequest message from the specified reader or buffer, length delimited. + * Decodes a RepairMode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest + * @returns {google.cloud.deploy.v1.RepairMode} RepairMode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelRolloutRequest.decodeDelimited = function decodeDelimited(reader) { + RepairMode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelRolloutRequest message. + * Verifies a RepairMode message. * @function verify - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelRolloutRequest.verify = function verify(message) { + RepairMode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + var properties = {}; + if (message.retry != null && message.hasOwnProperty("retry")) { + properties.mode = 1; + { + var error = $root.google.cloud.deploy.v1.Retry.verify(message.retry); + if (error) + return "retry." + error; + } + } + if (message.rollback != null && message.hasOwnProperty("rollback")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.cloud.deploy.v1.Rollback.verify(message.rollback); + if (error) + return "rollback." + error; + } + } return null; }; /** - * Creates a CancelRolloutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RepairMode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CancelRolloutRequest} CancelRolloutRequest + * @returns {google.cloud.deploy.v1.RepairMode} RepairMode */ - CancelRolloutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CancelRolloutRequest) + RepairMode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RepairMode) return object; - var message = new $root.google.cloud.deploy.v1.CancelRolloutRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.RepairMode(); + if (object.retry != null) { + if (typeof object.retry !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairMode.retry: object expected"); + message.retry = $root.google.cloud.deploy.v1.Retry.fromObject(object.retry); + } + if (object.rollback != null) { + if (typeof object.rollback !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairMode.rollback: object expected"); + message.rollback = $root.google.cloud.deploy.v1.Rollback.fromObject(object.rollback); + } return message; }; /** - * Creates a plain object from a CancelRolloutRequest message. Also converts values to other types if specified. + * Creates a plain object from a RepairMode message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static - * @param {google.cloud.deploy.v1.CancelRolloutRequest} message CancelRolloutRequest + * @param {google.cloud.deploy.v1.RepairMode} message RepairMode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelRolloutRequest.toObject = function toObject(message, options) { + RepairMode.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 (message.retry != null && message.hasOwnProperty("retry")) { + object.retry = $root.google.cloud.deploy.v1.Retry.toObject(message.retry, options); + if (options.oneofs) + object.mode = "retry"; + } + if (message.rollback != null && message.hasOwnProperty("rollback")) { + object.rollback = $root.google.cloud.deploy.v1.Rollback.toObject(message.rollback, options); + if (options.oneofs) + object.mode = "rollback"; + } return object; }; /** - * Converts this CancelRolloutRequest to JSON. + * Converts this RepairMode to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @instance * @returns {Object.} JSON object */ - CancelRolloutRequest.prototype.toJSON = function toJSON() { + RepairMode.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CancelRolloutRequest + * Gets the default type url for RepairMode * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CancelRolloutRequest + * @memberof google.cloud.deploy.v1.RepairMode * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CancelRolloutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RepairMode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CancelRolloutRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RepairMode"; }; - return CancelRolloutRequest; + return RepairMode; })(); - v1.CancelRolloutResponse = (function() { + v1.Retry = (function() { /** - * Properties of a CancelRolloutResponse. + * Properties of a Retry. * @memberof google.cloud.deploy.v1 - * @interface ICancelRolloutResponse + * @interface IRetry + * @property {number|Long|null} [attempts] Retry attempts + * @property {google.protobuf.IDuration|null} [wait] Retry wait + * @property {google.cloud.deploy.v1.BackoffMode|null} [backoffMode] Retry backoffMode */ /** - * Constructs a new CancelRolloutResponse. + * Constructs a new Retry. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CancelRolloutResponse. - * @implements ICancelRolloutResponse + * @classdesc Represents a Retry. + * @implements IRetry * @constructor - * @param {google.cloud.deploy.v1.ICancelRolloutResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRetry=} [properties] Properties to set */ - function CancelRolloutResponse(properties) { + function Retry(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24190,63 +34797,105 @@ } /** - * Creates a new CancelRolloutResponse instance using the specified properties. + * Retry attempts. + * @member {number|Long} attempts + * @memberof google.cloud.deploy.v1.Retry + * @instance + */ + Retry.prototype.attempts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Retry wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.Retry + * @instance + */ + Retry.prototype.wait = null; + + /** + * Retry backoffMode. + * @member {google.cloud.deploy.v1.BackoffMode} backoffMode + * @memberof google.cloud.deploy.v1.Retry + * @instance + */ + Retry.prototype.backoffMode = 0; + + /** + * Creates a new Retry instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static - * @param {google.cloud.deploy.v1.ICancelRolloutResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse instance + * @param {google.cloud.deploy.v1.IRetry=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Retry} Retry instance */ - CancelRolloutResponse.create = function create(properties) { - return new CancelRolloutResponse(properties); + Retry.create = function create(properties) { + return new Retry(properties); }; /** - * Encodes the specified CancelRolloutResponse message. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutResponse.verify|verify} messages. + * Encodes the specified Retry message. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static - * @param {google.cloud.deploy.v1.ICancelRolloutResponse} message CancelRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IRetry} message Retry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelRolloutResponse.encode = function encode(message, writer) { + Retry.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.attempts != null && Object.hasOwnProperty.call(message, "attempts")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.attempts); + if (message.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.backoffMode != null && Object.hasOwnProperty.call(message, "backoffMode")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backoffMode); return writer; }; /** - * Encodes the specified CancelRolloutResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelRolloutResponse.verify|verify} messages. + * Encodes the specified Retry message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Retry.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static - * @param {google.cloud.deploy.v1.ICancelRolloutResponse} message CancelRolloutResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IRetry} message Retry message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelRolloutResponse.encodeDelimited = function encodeDelimited(message, writer) { + Retry.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelRolloutResponse message from the specified reader or buffer. + * Decodes a Retry message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse + * @returns {google.cloud.deploy.v1.Retry} Retry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelRolloutResponse.decode = function decode(reader, length) { + Retry.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CancelRolloutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Retry(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.attempts = reader.int64(); + break; + } + case 2: { + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backoffMode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -24256,111 +34905,182 @@ }; /** - * Decodes a CancelRolloutResponse message from the specified reader or buffer, length delimited. + * Decodes a Retry message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse + * @returns {google.cloud.deploy.v1.Retry} Retry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelRolloutResponse.decodeDelimited = function decodeDelimited(reader) { + Retry.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelRolloutResponse message. + * Verifies a Retry message. * @function verify - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelRolloutResponse.verify = function verify(message) { + Retry.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.attempts != null && message.hasOwnProperty("attempts")) + if (!$util.isInteger(message.attempts) && !(message.attempts && $util.isInteger(message.attempts.low) && $util.isInteger(message.attempts.high))) + return "attempts: integer|Long expected"; + if (message.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; + } + if (message.backoffMode != null && message.hasOwnProperty("backoffMode")) + switch (message.backoffMode) { + default: + return "backoffMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CancelRolloutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Retry message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CancelRolloutResponse} CancelRolloutResponse + * @returns {google.cloud.deploy.v1.Retry} Retry */ - CancelRolloutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CancelRolloutResponse) + Retry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Retry) return object; - return new $root.google.cloud.deploy.v1.CancelRolloutResponse(); + var message = new $root.google.cloud.deploy.v1.Retry(); + if (object.attempts != null) + if ($util.Long) + (message.attempts = $util.Long.fromValue(object.attempts)).unsigned = false; + else if (typeof object.attempts === "string") + message.attempts = parseInt(object.attempts, 10); + else if (typeof object.attempts === "number") + message.attempts = object.attempts; + else if (typeof object.attempts === "object") + message.attempts = new $util.LongBits(object.attempts.low >>> 0, object.attempts.high >>> 0).toNumber(); + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.Retry.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); + } + switch (object.backoffMode) { + default: + if (typeof object.backoffMode === "number") { + message.backoffMode = object.backoffMode; + break; + } + break; + case "BACKOFF_MODE_UNSPECIFIED": + case 0: + message.backoffMode = 0; + break; + case "BACKOFF_MODE_LINEAR": + case 1: + message.backoffMode = 1; + break; + case "BACKOFF_MODE_EXPONENTIAL": + case 2: + message.backoffMode = 2; + break; + } + return message; }; /** - * Creates a plain object from a CancelRolloutResponse message. Also converts values to other types if specified. + * Creates a plain object from a Retry message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static - * @param {google.cloud.deploy.v1.CancelRolloutResponse} message CancelRolloutResponse + * @param {google.cloud.deploy.v1.Retry} message Retry * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelRolloutResponse.toObject = function toObject() { - return {}; + Retry.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.attempts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attempts = options.longs === String ? "0" : 0; + object.wait = null; + object.backoffMode = options.enums === String ? "BACKOFF_MODE_UNSPECIFIED" : 0; + } + if (message.attempts != null && message.hasOwnProperty("attempts")) + if (typeof message.attempts === "number") + object.attempts = options.longs === String ? String(message.attempts) : message.attempts; + else + object.attempts = options.longs === String ? $util.Long.prototype.toString.call(message.attempts) : options.longs === Number ? new $util.LongBits(message.attempts.low >>> 0, message.attempts.high >>> 0).toNumber() : message.attempts; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.backoffMode != null && message.hasOwnProperty("backoffMode")) + object.backoffMode = options.enums === String ? $root.google.cloud.deploy.v1.BackoffMode[message.backoffMode] === undefined ? message.backoffMode : $root.google.cloud.deploy.v1.BackoffMode[message.backoffMode] : message.backoffMode; + return object; }; /** - * Converts this CancelRolloutResponse to JSON. + * Converts this Retry to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @instance * @returns {Object.} JSON object */ - CancelRolloutResponse.prototype.toJSON = function toJSON() { + Retry.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CancelRolloutResponse + * Gets the default type url for Retry * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CancelRolloutResponse + * @memberof google.cloud.deploy.v1.Retry * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CancelRolloutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Retry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CancelRolloutResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Retry"; }; - return CancelRolloutResponse; + return Retry; })(); - v1.IgnoreJobRequest = (function() { + v1.Rollback = (function() { /** - * Properties of an IgnoreJobRequest. + * Properties of a Rollback. * @memberof google.cloud.deploy.v1 - * @interface IIgnoreJobRequest - * @property {string|null} [rollout] IgnoreJobRequest rollout - * @property {string|null} [phaseId] IgnoreJobRequest phaseId - * @property {string|null} [jobId] IgnoreJobRequest jobId + * @interface IRollback + * @property {string|null} [destinationPhase] Rollback destinationPhase */ /** - * Constructs a new IgnoreJobRequest. + * Constructs a new Rollback. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an IgnoreJobRequest. - * @implements IIgnoreJobRequest + * @classdesc Represents a Rollback. + * @implements IRollback * @constructor - * @param {google.cloud.deploy.v1.IIgnoreJobRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRollback=} [properties] Properties to set */ - function IgnoreJobRequest(properties) { + function Rollback(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24368,103 +35088,75 @@ } /** - * IgnoreJobRequest rollout. - * @member {string} rollout - * @memberof google.cloud.deploy.v1.IgnoreJobRequest - * @instance - */ - IgnoreJobRequest.prototype.rollout = ""; - - /** - * IgnoreJobRequest phaseId. - * @member {string} phaseId - * @memberof google.cloud.deploy.v1.IgnoreJobRequest - * @instance - */ - IgnoreJobRequest.prototype.phaseId = ""; - - /** - * IgnoreJobRequest jobId. - * @member {string} jobId - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * Rollback destinationPhase. + * @member {string} destinationPhase + * @memberof google.cloud.deploy.v1.Rollback * @instance */ - IgnoreJobRequest.prototype.jobId = ""; + Rollback.prototype.destinationPhase = ""; /** - * Creates a new IgnoreJobRequest instance using the specified properties. + * Creates a new Rollback instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static - * @param {google.cloud.deploy.v1.IIgnoreJobRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest instance + * @param {google.cloud.deploy.v1.IRollback=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.Rollback} Rollback instance */ - IgnoreJobRequest.create = function create(properties) { - return new IgnoreJobRequest(properties); + Rollback.create = function create(properties) { + return new Rollback(properties); }; /** - * Encodes the specified IgnoreJobRequest message. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobRequest.verify|verify} messages. + * Encodes the specified Rollback message. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static - * @param {google.cloud.deploy.v1.IIgnoreJobRequest} message IgnoreJobRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRollback} message Rollback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IgnoreJobRequest.encode = function encode(message, writer) { + Rollback.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); - if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); + if (message.destinationPhase != null && Object.hasOwnProperty.call(message, "destinationPhase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationPhase); return writer; }; /** - * Encodes the specified IgnoreJobRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobRequest.verify|verify} messages. + * Encodes the specified Rollback message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Rollback.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static - * @param {google.cloud.deploy.v1.IIgnoreJobRequest} message IgnoreJobRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRollback} message Rollback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IgnoreJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + Rollback.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IgnoreJobRequest message from the specified reader or buffer. + * Decodes a Rollback message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest + * @returns {google.cloud.deploy.v1.Rollback} Rollback * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IgnoreJobRequest.decode = function decode(reader, length) { + Rollback.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.IgnoreJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Rollback(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rollout = reader.string(); - break; - } - case 2: { - message.phaseId = reader.string(); - break; - } - case 3: { - message.jobId = reader.string(); + message.destinationPhase = reader.string(); break; } default: @@ -24476,138 +35168,122 @@ }; /** - * Decodes an IgnoreJobRequest message from the specified reader or buffer, length delimited. + * Decodes a Rollback message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest + * @returns {google.cloud.deploy.v1.Rollback} Rollback * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IgnoreJobRequest.decodeDelimited = function decodeDelimited(reader) { + Rollback.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IgnoreJobRequest message. + * Verifies a Rollback message. * @function verify - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IgnoreJobRequest.verify = function verify(message) { + Rollback.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) - if (!$util.isString(message.rollout)) - return "rollout: string expected"; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - if (!$util.isString(message.phaseId)) - return "phaseId: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + if (!$util.isString(message.destinationPhase)) + return "destinationPhase: string expected"; return null; }; /** - * Creates an IgnoreJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Rollback message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.IgnoreJobRequest} IgnoreJobRequest + * @returns {google.cloud.deploy.v1.Rollback} Rollback */ - IgnoreJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.IgnoreJobRequest) + Rollback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.Rollback) return object; - var message = new $root.google.cloud.deploy.v1.IgnoreJobRequest(); - if (object.rollout != null) - message.rollout = String(object.rollout); - if (object.phaseId != null) - message.phaseId = String(object.phaseId); - if (object.jobId != null) - message.jobId = String(object.jobId); + var message = new $root.google.cloud.deploy.v1.Rollback(); + if (object.destinationPhase != null) + message.destinationPhase = String(object.destinationPhase); return message; }; /** - * Creates a plain object from an IgnoreJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a Rollback message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static - * @param {google.cloud.deploy.v1.IgnoreJobRequest} message IgnoreJobRequest + * @param {google.cloud.deploy.v1.Rollback} message Rollback * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IgnoreJobRequest.toObject = function toObject(message, options) { + Rollback.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.rollout = ""; - object.phaseId = ""; - object.jobId = ""; - } - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = message.rollout; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - object.phaseId = message.phaseId; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; + if (options.defaults) + object.destinationPhase = ""; + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + object.destinationPhase = message.destinationPhase; return object; }; /** - * Converts this IgnoreJobRequest to JSON. + * Converts this Rollback to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @instance * @returns {Object.} JSON object */ - IgnoreJobRequest.prototype.toJSON = function toJSON() { + Rollback.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IgnoreJobRequest + * Gets the default type url for Rollback * @function getTypeUrl - * @memberof google.cloud.deploy.v1.IgnoreJobRequest + * @memberof google.cloud.deploy.v1.Rollback * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IgnoreJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Rollback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.IgnoreJobRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.Rollback"; }; - return IgnoreJobRequest; + return Rollback; })(); - v1.IgnoreJobResponse = (function() { + v1.AutomationRuleCondition = (function() { /** - * Properties of an IgnoreJobResponse. + * Properties of an AutomationRuleCondition. * @memberof google.cloud.deploy.v1 - * @interface IIgnoreJobResponse + * @interface IAutomationRuleCondition + * @property {google.cloud.deploy.v1.ITargetsPresentCondition|null} [targetsPresentCondition] AutomationRuleCondition targetsPresentCondition */ /** - * Constructs a new IgnoreJobResponse. + * Constructs a new AutomationRuleCondition. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an IgnoreJobResponse. - * @implements IIgnoreJobResponse + * @classdesc Represents an AutomationRuleCondition. + * @implements IAutomationRuleCondition * @constructor - * @param {google.cloud.deploy.v1.IIgnoreJobResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAutomationRuleCondition=} [properties] Properties to set */ - function IgnoreJobResponse(properties) { + function AutomationRuleCondition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24615,63 +35291,77 @@ } /** - * Creates a new IgnoreJobResponse instance using the specified properties. + * AutomationRuleCondition targetsPresentCondition. + * @member {google.cloud.deploy.v1.ITargetsPresentCondition|null|undefined} targetsPresentCondition + * @memberof google.cloud.deploy.v1.AutomationRuleCondition + * @instance + */ + AutomationRuleCondition.prototype.targetsPresentCondition = null; + + /** + * Creates a new AutomationRuleCondition instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static - * @param {google.cloud.deploy.v1.IIgnoreJobResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse instance + * @param {google.cloud.deploy.v1.IAutomationRuleCondition=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationRuleCondition} AutomationRuleCondition instance */ - IgnoreJobResponse.create = function create(properties) { - return new IgnoreJobResponse(properties); + AutomationRuleCondition.create = function create(properties) { + return new AutomationRuleCondition(properties); }; /** - * Encodes the specified IgnoreJobResponse message. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobResponse.verify|verify} messages. + * Encodes the specified AutomationRuleCondition message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRuleCondition.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static - * @param {google.cloud.deploy.v1.IIgnoreJobResponse} message IgnoreJobResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationRuleCondition} message AutomationRuleCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IgnoreJobResponse.encode = function encode(message, writer) { + AutomationRuleCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.targetsPresentCondition != null && Object.hasOwnProperty.call(message, "targetsPresentCondition")) + $root.google.cloud.deploy.v1.TargetsPresentCondition.encode(message.targetsPresentCondition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified IgnoreJobResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.IgnoreJobResponse.verify|verify} messages. + * Encodes the specified AutomationRuleCondition message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRuleCondition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static - * @param {google.cloud.deploy.v1.IIgnoreJobResponse} message IgnoreJobResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationRuleCondition} message AutomationRuleCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IgnoreJobResponse.encodeDelimited = function encodeDelimited(message, writer) { + AutomationRuleCondition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IgnoreJobResponse message from the specified reader or buffer. + * Decodes an AutomationRuleCondition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse + * @returns {google.cloud.deploy.v1.AutomationRuleCondition} AutomationRuleCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IgnoreJobResponse.decode = function decode(reader, length) { + AutomationRuleCondition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.IgnoreJobResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationRuleCondition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24681,111 +35371,131 @@ }; /** - * Decodes an IgnoreJobResponse message from the specified reader or buffer, length delimited. + * Decodes an AutomationRuleCondition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse + * @returns {google.cloud.deploy.v1.AutomationRuleCondition} AutomationRuleCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IgnoreJobResponse.decodeDelimited = function decodeDelimited(reader) { + AutomationRuleCondition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IgnoreJobResponse message. + * Verifies an AutomationRuleCondition message. * @function verify - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IgnoreJobResponse.verify = function verify(message) { + AutomationRuleCondition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) { + var error = $root.google.cloud.deploy.v1.TargetsPresentCondition.verify(message.targetsPresentCondition); + if (error) + return "targetsPresentCondition." + error; + } return null; }; /** - * Creates an IgnoreJobResponse message from a plain object. Also converts values to their respective internal types. + * Creates an AutomationRuleCondition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.IgnoreJobResponse} IgnoreJobResponse + * @returns {google.cloud.deploy.v1.AutomationRuleCondition} AutomationRuleCondition */ - IgnoreJobResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.IgnoreJobResponse) + AutomationRuleCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationRuleCondition) return object; - return new $root.google.cloud.deploy.v1.IgnoreJobResponse(); + var message = new $root.google.cloud.deploy.v1.AutomationRuleCondition(); + if (object.targetsPresentCondition != null) { + if (typeof object.targetsPresentCondition !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRuleCondition.targetsPresentCondition: object expected"); + message.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.fromObject(object.targetsPresentCondition); + } + return message; }; /** - * Creates a plain object from an IgnoreJobResponse message. Also converts values to other types if specified. + * Creates a plain object from an AutomationRuleCondition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static - * @param {google.cloud.deploy.v1.IgnoreJobResponse} message IgnoreJobResponse + * @param {google.cloud.deploy.v1.AutomationRuleCondition} message AutomationRuleCondition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IgnoreJobResponse.toObject = function toObject() { - return {}; + AutomationRuleCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.targetsPresentCondition = null; + if (message.targetsPresentCondition != null && message.hasOwnProperty("targetsPresentCondition")) + object.targetsPresentCondition = $root.google.cloud.deploy.v1.TargetsPresentCondition.toObject(message.targetsPresentCondition, options); + return object; }; /** - * Converts this IgnoreJobResponse to JSON. + * Converts this AutomationRuleCondition to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @instance * @returns {Object.} JSON object */ - IgnoreJobResponse.prototype.toJSON = function toJSON() { + AutomationRuleCondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IgnoreJobResponse + * Gets the default type url for AutomationRuleCondition * @function getTypeUrl - * @memberof google.cloud.deploy.v1.IgnoreJobResponse + * @memberof google.cloud.deploy.v1.AutomationRuleCondition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IgnoreJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AutomationRuleCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.IgnoreJobResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationRuleCondition"; }; - return IgnoreJobResponse; + return AutomationRuleCondition; })(); - v1.RetryJobRequest = (function() { + v1.CreateAutomationRequest = (function() { /** - * Properties of a RetryJobRequest. + * Properties of a CreateAutomationRequest. * @memberof google.cloud.deploy.v1 - * @interface IRetryJobRequest - * @property {string|null} [rollout] RetryJobRequest rollout - * @property {string|null} [phaseId] RetryJobRequest phaseId - * @property {string|null} [jobId] RetryJobRequest jobId + * @interface ICreateAutomationRequest + * @property {string|null} [parent] CreateAutomationRequest parent + * @property {string|null} [automationId] CreateAutomationRequest automationId + * @property {google.cloud.deploy.v1.IAutomation|null} [automation] CreateAutomationRequest automation + * @property {string|null} [requestId] CreateAutomationRequest requestId + * @property {boolean|null} [validateOnly] CreateAutomationRequest validateOnly */ /** - * Constructs a new RetryJobRequest. + * Constructs a new CreateAutomationRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a RetryJobRequest. - * @implements IRetryJobRequest + * @classdesc Represents a CreateAutomationRequest. + * @implements ICreateAutomationRequest * @constructor - * @param {google.cloud.deploy.v1.IRetryJobRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICreateAutomationRequest=} [properties] Properties to set */ - function RetryJobRequest(properties) { + function CreateAutomationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24793,103 +35503,131 @@ } /** - * RetryJobRequest rollout. - * @member {string} rollout - * @memberof google.cloud.deploy.v1.RetryJobRequest + * CreateAutomationRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @instance */ - RetryJobRequest.prototype.rollout = ""; + CreateAutomationRequest.prototype.parent = ""; /** - * RetryJobRequest phaseId. - * @member {string} phaseId - * @memberof google.cloud.deploy.v1.RetryJobRequest + * CreateAutomationRequest automationId. + * @member {string} automationId + * @memberof google.cloud.deploy.v1.CreateAutomationRequest + * @instance + */ + CreateAutomationRequest.prototype.automationId = ""; + + /** + * CreateAutomationRequest automation. + * @member {google.cloud.deploy.v1.IAutomation|null|undefined} automation + * @memberof google.cloud.deploy.v1.CreateAutomationRequest + * @instance + */ + CreateAutomationRequest.prototype.automation = null; + + /** + * CreateAutomationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @instance */ - RetryJobRequest.prototype.phaseId = ""; + CreateAutomationRequest.prototype.requestId = ""; /** - * RetryJobRequest jobId. - * @member {string} jobId - * @memberof google.cloud.deploy.v1.RetryJobRequest + * CreateAutomationRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @instance */ - RetryJobRequest.prototype.jobId = ""; + CreateAutomationRequest.prototype.validateOnly = false; /** - * Creates a new RetryJobRequest instance using the specified properties. + * Creates a new CreateAutomationRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static - * @param {google.cloud.deploy.v1.IRetryJobRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest instance + * @param {google.cloud.deploy.v1.ICreateAutomationRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CreateAutomationRequest} CreateAutomationRequest instance */ - RetryJobRequest.create = function create(properties) { - return new RetryJobRequest(properties); + CreateAutomationRequest.create = function create(properties) { + return new CreateAutomationRequest(properties); }; /** - * Encodes the specified RetryJobRequest message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. + * Encodes the specified CreateAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.CreateAutomationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static - * @param {google.cloud.deploy.v1.IRetryJobRequest} message RetryJobRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateAutomationRequest} message CreateAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RetryJobRequest.encode = function encode(message, writer) { + CreateAutomationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); - if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.phaseId); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jobId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.automationId != null && Object.hasOwnProperty.call(message, "automationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.automationId); + if (message.automation != null && Object.hasOwnProperty.call(message, "automation")) + $root.google.cloud.deploy.v1.Automation.encode(message.automation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified RetryJobRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobRequest.verify|verify} messages. + * Encodes the specified CreateAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateAutomationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static - * @param {google.cloud.deploy.v1.IRetryJobRequest} message RetryJobRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICreateAutomationRequest} message CreateAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RetryJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAutomationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RetryJobRequest message from the specified reader or buffer. + * Decodes a CreateAutomationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + * @returns {google.cloud.deploy.v1.CreateAutomationRequest} CreateAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RetryJobRequest.decode = function decode(reader, length) { + CreateAutomationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateAutomationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rollout = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.phaseId = reader.string(); + message.automationId = reader.string(); break; } case 3: { - message.jobId = reader.string(); + message.automation = $root.google.cloud.deploy.v1.Automation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); break; } default: @@ -24901,138 +35639,164 @@ }; /** - * Decodes a RetryJobRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAutomationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + * @returns {google.cloud.deploy.v1.CreateAutomationRequest} CreateAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RetryJobRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAutomationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RetryJobRequest message. + * Verifies a CreateAutomationRequest message. * @function verify - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RetryJobRequest.verify = function verify(message) { + CreateAutomationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) - if (!$util.isString(message.rollout)) - return "rollout: string expected"; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - if (!$util.isString(message.phaseId)) - return "phaseId: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.automationId != null && message.hasOwnProperty("automationId")) + if (!$util.isString(message.automationId)) + return "automationId: string expected"; + if (message.automation != null && message.hasOwnProperty("automation")) { + var error = $root.google.cloud.deploy.v1.Automation.verify(message.automation); + if (error) + return "automation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a RetryJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAutomationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.RetryJobRequest} RetryJobRequest + * @returns {google.cloud.deploy.v1.CreateAutomationRequest} CreateAutomationRequest */ - RetryJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.RetryJobRequest) + CreateAutomationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CreateAutomationRequest) return object; - var message = new $root.google.cloud.deploy.v1.RetryJobRequest(); - if (object.rollout != null) - message.rollout = String(object.rollout); - if (object.phaseId != null) - message.phaseId = String(object.phaseId); - if (object.jobId != null) - message.jobId = String(object.jobId); + var message = new $root.google.cloud.deploy.v1.CreateAutomationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.automationId != null) + message.automationId = String(object.automationId); + if (object.automation != null) { + if (typeof object.automation !== "object") + throw TypeError(".google.cloud.deploy.v1.CreateAutomationRequest.automation: object expected"); + message.automation = $root.google.cloud.deploy.v1.Automation.fromObject(object.automation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a RetryJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAutomationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static - * @param {google.cloud.deploy.v1.RetryJobRequest} message RetryJobRequest + * @param {google.cloud.deploy.v1.CreateAutomationRequest} message CreateAutomationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RetryJobRequest.toObject = function toObject(message, options) { + CreateAutomationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.rollout = ""; - object.phaseId = ""; - object.jobId = ""; + object.parent = ""; + object.automationId = ""; + object.automation = null; + object.requestId = ""; + object.validateOnly = false; } - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = message.rollout; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - object.phaseId = message.phaseId; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.automationId != null && message.hasOwnProperty("automationId")) + object.automationId = message.automationId; + if (message.automation != null && message.hasOwnProperty("automation")) + object.automation = $root.google.cloud.deploy.v1.Automation.toObject(message.automation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this RetryJobRequest to JSON. + * Converts this CreateAutomationRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @instance * @returns {Object.} JSON object */ - RetryJobRequest.prototype.toJSON = function toJSON() { + CreateAutomationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RetryJobRequest + * Gets the default type url for CreateAutomationRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.RetryJobRequest + * @memberof google.cloud.deploy.v1.CreateAutomationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RetryJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAutomationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.RetryJobRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CreateAutomationRequest"; }; - return RetryJobRequest; + return CreateAutomationRequest; })(); - v1.RetryJobResponse = (function() { + v1.UpdateAutomationRequest = (function() { /** - * Properties of a RetryJobResponse. + * Properties of an UpdateAutomationRequest. * @memberof google.cloud.deploy.v1 - * @interface IRetryJobResponse + * @interface IUpdateAutomationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAutomationRequest updateMask + * @property {google.cloud.deploy.v1.IAutomation|null} [automation] UpdateAutomationRequest automation + * @property {string|null} [requestId] UpdateAutomationRequest requestId + * @property {boolean|null} [allowMissing] UpdateAutomationRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateAutomationRequest validateOnly */ /** - * Constructs a new RetryJobResponse. + * Constructs a new UpdateAutomationRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a RetryJobResponse. - * @implements IRetryJobResponse + * @classdesc Represents an UpdateAutomationRequest. + * @implements IUpdateAutomationRequest * @constructor - * @param {google.cloud.deploy.v1.IRetryJobResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IUpdateAutomationRequest=} [properties] Properties to set */ - function RetryJobResponse(properties) { + function UpdateAutomationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25040,63 +35804,133 @@ } /** - * Creates a new RetryJobResponse instance using the specified properties. + * UpdateAutomationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest + * @instance + */ + UpdateAutomationRequest.prototype.updateMask = null; + + /** + * UpdateAutomationRequest automation. + * @member {google.cloud.deploy.v1.IAutomation|null|undefined} automation + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest + * @instance + */ + UpdateAutomationRequest.prototype.automation = null; + + /** + * UpdateAutomationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest + * @instance + */ + UpdateAutomationRequest.prototype.requestId = ""; + + /** + * UpdateAutomationRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest + * @instance + */ + UpdateAutomationRequest.prototype.allowMissing = false; + + /** + * UpdateAutomationRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest + * @instance + */ + UpdateAutomationRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateAutomationRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static - * @param {google.cloud.deploy.v1.IRetryJobResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse instance + * @param {google.cloud.deploy.v1.IUpdateAutomationRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.UpdateAutomationRequest} UpdateAutomationRequest instance */ - RetryJobResponse.create = function create(properties) { - return new RetryJobResponse(properties); + UpdateAutomationRequest.create = function create(properties) { + return new UpdateAutomationRequest(properties); }; /** - * Encodes the specified RetryJobResponse message. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * Encodes the specified UpdateAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.UpdateAutomationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static - * @param {google.cloud.deploy.v1.IRetryJobResponse} message RetryJobResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IUpdateAutomationRequest} message UpdateAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RetryJobResponse.encode = function encode(message, writer) { + UpdateAutomationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.automation != null && Object.hasOwnProperty.call(message, "automation")) + $root.google.cloud.deploy.v1.Automation.encode(message.automation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified RetryJobResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryJobResponse.verify|verify} messages. + * Encodes the specified UpdateAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.UpdateAutomationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static - * @param {google.cloud.deploy.v1.IRetryJobResponse} message RetryJobResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IUpdateAutomationRequest} message UpdateAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RetryJobResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAutomationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RetryJobResponse message from the specified reader or buffer. + * Decodes an UpdateAutomationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + * @returns {google.cloud.deploy.v1.UpdateAutomationRequest} UpdateAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RetryJobResponse.decode = function decode(reader, length) { + UpdateAutomationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryJobResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.UpdateAutomationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.automation = $root.google.cloud.deploy.v1.Automation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -25106,109 +35940,169 @@ }; /** - * Decodes a RetryJobResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateAutomationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + * @returns {google.cloud.deploy.v1.UpdateAutomationRequest} UpdateAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RetryJobResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateAutomationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RetryJobResponse message. + * Verifies an UpdateAutomationRequest message. * @function verify - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RetryJobResponse.verify = function verify(message) { + UpdateAutomationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.automation != null && message.hasOwnProperty("automation")) { + var error = $root.google.cloud.deploy.v1.Automation.verify(message.automation); + if (error) + return "automation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: 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 RetryJobResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAutomationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.RetryJobResponse} RetryJobResponse + * @returns {google.cloud.deploy.v1.UpdateAutomationRequest} UpdateAutomationRequest */ - RetryJobResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.RetryJobResponse) + UpdateAutomationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.UpdateAutomationRequest) return object; - return new $root.google.cloud.deploy.v1.RetryJobResponse(); + var message = new $root.google.cloud.deploy.v1.UpdateAutomationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateAutomationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.automation != null) { + if (typeof object.automation !== "object") + throw TypeError(".google.cloud.deploy.v1.UpdateAutomationRequest.automation: object expected"); + message.automation = $root.google.cloud.deploy.v1.Automation.fromObject(object.automation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + 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 RetryJobResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAutomationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static - * @param {google.cloud.deploy.v1.RetryJobResponse} message RetryJobResponse + * @param {google.cloud.deploy.v1.UpdateAutomationRequest} message UpdateAutomationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RetryJobResponse.toObject = function toObject() { - return {}; + UpdateAutomationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.automation = null; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.automation != null && message.hasOwnProperty("automation")) + object.automation = $root.google.cloud.deploy.v1.Automation.toObject(message.automation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + 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 RetryJobResponse to JSON. + * Converts this UpdateAutomationRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @instance * @returns {Object.} JSON object */ - RetryJobResponse.prototype.toJSON = function toJSON() { + UpdateAutomationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RetryJobResponse + * Gets the default type url for UpdateAutomationRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.RetryJobResponse + * @memberof google.cloud.deploy.v1.UpdateAutomationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RetryJobResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAutomationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.RetryJobResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.UpdateAutomationRequest"; }; - return RetryJobResponse; + return UpdateAutomationRequest; })(); - v1.AbandonReleaseRequest = (function() { + v1.DeleteAutomationRequest = (function() { /** - * Properties of an AbandonReleaseRequest. + * Properties of a DeleteAutomationRequest. * @memberof google.cloud.deploy.v1 - * @interface IAbandonReleaseRequest - * @property {string|null} [name] AbandonReleaseRequest name + * @interface IDeleteAutomationRequest + * @property {string|null} [name] DeleteAutomationRequest name + * @property {string|null} [requestId] DeleteAutomationRequest requestId + * @property {boolean|null} [allowMissing] DeleteAutomationRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteAutomationRequest validateOnly + * @property {string|null} [etag] DeleteAutomationRequest etag */ /** - * Constructs a new AbandonReleaseRequest. + * Constructs a new DeleteAutomationRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AbandonReleaseRequest. - * @implements IAbandonReleaseRequest + * @classdesc Represents a DeleteAutomationRequest. + * @implements IDeleteAutomationRequest * @constructor - * @param {google.cloud.deploy.v1.IAbandonReleaseRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IDeleteAutomationRequest=} [properties] Properties to set */ - function AbandonReleaseRequest(properties) { + function DeleteAutomationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25216,70 +36110,110 @@ } /** - * AbandonReleaseRequest name. + * DeleteAutomationRequest name. * @member {string} name - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @instance */ - AbandonReleaseRequest.prototype.name = ""; + DeleteAutomationRequest.prototype.name = ""; /** - * Creates a new AbandonReleaseRequest instance using the specified properties. + * DeleteAutomationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest + * @instance + */ + DeleteAutomationRequest.prototype.requestId = ""; + + /** + * DeleteAutomationRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest + * @instance + */ + DeleteAutomationRequest.prototype.allowMissing = false; + + /** + * DeleteAutomationRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest + * @instance + */ + DeleteAutomationRequest.prototype.validateOnly = false; + + /** + * DeleteAutomationRequest etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest + * @instance + */ + DeleteAutomationRequest.prototype.etag = ""; + + /** + * Creates a new DeleteAutomationRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static - * @param {google.cloud.deploy.v1.IAbandonReleaseRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest instance + * @param {google.cloud.deploy.v1.IDeleteAutomationRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeleteAutomationRequest} DeleteAutomationRequest instance */ - AbandonReleaseRequest.create = function create(properties) { - return new AbandonReleaseRequest(properties); + DeleteAutomationRequest.create = function create(properties) { + return new DeleteAutomationRequest(properties); }; /** - * Encodes the specified AbandonReleaseRequest message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * Encodes the specified DeleteAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.DeleteAutomationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static - * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} message AbandonReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IDeleteAutomationRequest} message DeleteAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AbandonReleaseRequest.encode = function encode(message, writer) { + DeleteAutomationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + 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); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); return writer; }; /** - * Encodes the specified AbandonReleaseRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseRequest.verify|verify} messages. + * Encodes the specified DeleteAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeleteAutomationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static - * @param {google.cloud.deploy.v1.IAbandonReleaseRequest} message AbandonReleaseRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IDeleteAutomationRequest} message DeleteAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AbandonReleaseRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAutomationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AbandonReleaseRequest message from the specified reader or buffer. + * Decodes a DeleteAutomationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @returns {google.cloud.deploy.v1.DeleteAutomationRequest} DeleteAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AbandonReleaseRequest.decode = function decode(reader, length) { + DeleteAutomationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AbandonReleaseRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeleteAutomationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25287,6 +36221,22 @@ message.name = reader.string(); break; } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + case 5: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25296,121 +36246,159 @@ }; /** - * Decodes an AbandonReleaseRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAutomationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @returns {google.cloud.deploy.v1.DeleteAutomationRequest} DeleteAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AbandonReleaseRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteAutomationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AbandonReleaseRequest message. + * Verifies a DeleteAutomationRequest message. * @function verify - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AbandonReleaseRequest.verify = function verify(message) { + DeleteAutomationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + 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"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates an AbandonReleaseRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAutomationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AbandonReleaseRequest} AbandonReleaseRequest + * @returns {google.cloud.deploy.v1.DeleteAutomationRequest} DeleteAutomationRequest */ - AbandonReleaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AbandonReleaseRequest) + DeleteAutomationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeleteAutomationRequest) return object; - var message = new $root.google.cloud.deploy.v1.AbandonReleaseRequest(); + var message = new $root.google.cloud.deploy.v1.DeleteAutomationRequest(); if (object.name != null) message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from an AbandonReleaseRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAutomationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static - * @param {google.cloud.deploy.v1.AbandonReleaseRequest} message AbandonReleaseRequest + * @param {google.cloud.deploy.v1.DeleteAutomationRequest} message DeleteAutomationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AbandonReleaseRequest.toObject = function toObject(message, options) { + DeleteAutomationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.requestId = ""; + object.allowMissing = false; + object.validateOnly = false; + object.etag = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this AbandonReleaseRequest to JSON. + * Converts this DeleteAutomationRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @instance * @returns {Object.} JSON object */ - AbandonReleaseRequest.prototype.toJSON = function toJSON() { + DeleteAutomationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AbandonReleaseRequest + * Gets the default type url for DeleteAutomationRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AbandonReleaseRequest + * @memberof google.cloud.deploy.v1.DeleteAutomationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AbandonReleaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteAutomationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AbandonReleaseRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.DeleteAutomationRequest"; }; - return AbandonReleaseRequest; + return DeleteAutomationRequest; })(); - v1.AbandonReleaseResponse = (function() { + v1.ListAutomationsRequest = (function() { /** - * Properties of an AbandonReleaseResponse. + * Properties of a ListAutomationsRequest. * @memberof google.cloud.deploy.v1 - * @interface IAbandonReleaseResponse + * @interface IListAutomationsRequest + * @property {string|null} [parent] ListAutomationsRequest parent + * @property {number|null} [pageSize] ListAutomationsRequest pageSize + * @property {string|null} [pageToken] ListAutomationsRequest pageToken + * @property {string|null} [filter] ListAutomationsRequest filter + * @property {string|null} [orderBy] ListAutomationsRequest orderBy */ /** - * Constructs a new AbandonReleaseResponse. + * Constructs a new ListAutomationsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AbandonReleaseResponse. - * @implements IAbandonReleaseResponse + * @classdesc Represents a ListAutomationsRequest. + * @implements IListAutomationsRequest * @constructor - * @param {google.cloud.deploy.v1.IAbandonReleaseResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListAutomationsRequest=} [properties] Properties to set */ - function AbandonReleaseResponse(properties) { + function ListAutomationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25418,63 +36406,133 @@ } /** - * Creates a new AbandonReleaseResponse instance using the specified properties. + * ListAutomationsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListAutomationsRequest + * @instance + */ + ListAutomationsRequest.prototype.parent = ""; + + /** + * ListAutomationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListAutomationsRequest + * @instance + */ + ListAutomationsRequest.prototype.pageSize = 0; + + /** + * ListAutomationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListAutomationsRequest + * @instance + */ + ListAutomationsRequest.prototype.pageToken = ""; + + /** + * ListAutomationsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListAutomationsRequest + * @instance + */ + ListAutomationsRequest.prototype.filter = ""; + + /** + * ListAutomationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListAutomationsRequest + * @instance + */ + ListAutomationsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAutomationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static - * @param {google.cloud.deploy.v1.IAbandonReleaseResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse instance + * @param {google.cloud.deploy.v1.IListAutomationsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListAutomationsRequest} ListAutomationsRequest instance */ - AbandonReleaseResponse.create = function create(properties) { - return new AbandonReleaseResponse(properties); + ListAutomationsRequest.create = function create(properties) { + return new ListAutomationsRequest(properties); }; /** - * Encodes the specified AbandonReleaseResponse message. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. + * Encodes the specified ListAutomationsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static - * @param {google.cloud.deploy.v1.IAbandonReleaseResponse} message AbandonReleaseResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationsRequest} message ListAutomationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AbandonReleaseResponse.encode = function encode(message, writer) { + ListAutomationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified AbandonReleaseResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AbandonReleaseResponse.verify|verify} messages. + * Encodes the specified ListAutomationsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static - * @param {google.cloud.deploy.v1.IAbandonReleaseResponse} message AbandonReleaseResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationsRequest} message ListAutomationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AbandonReleaseResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAutomationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AbandonReleaseResponse message from the specified reader or buffer. + * Decodes a ListAutomationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse + * @returns {google.cloud.deploy.v1.ListAutomationsRequest} ListAutomationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AbandonReleaseResponse.decode = function decode(reader, length) { + ListAutomationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AbandonReleaseResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListAutomationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -25484,123 +36542,159 @@ }; /** - * Decodes an AbandonReleaseResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAutomationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse + * @returns {google.cloud.deploy.v1.ListAutomationsRequest} ListAutomationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AbandonReleaseResponse.decodeDelimited = function decodeDelimited(reader) { + ListAutomationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AbandonReleaseResponse message. + * Verifies a ListAutomationsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AbandonReleaseResponse.verify = function verify(message) { + ListAutomationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates an AbandonReleaseResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAutomationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AbandonReleaseResponse} AbandonReleaseResponse + * @returns {google.cloud.deploy.v1.ListAutomationsRequest} ListAutomationsRequest */ - AbandonReleaseResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AbandonReleaseResponse) + ListAutomationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListAutomationsRequest) return object; - return new $root.google.cloud.deploy.v1.AbandonReleaseResponse(); + var message = new $root.google.cloud.deploy.v1.ListAutomationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; }; /** - * Creates a plain object from an AbandonReleaseResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAutomationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static - * @param {google.cloud.deploy.v1.AbandonReleaseResponse} message AbandonReleaseResponse + * @param {google.cloud.deploy.v1.ListAutomationsRequest} message ListAutomationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AbandonReleaseResponse.toObject = function toObject() { - return {}; + ListAutomationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; }; /** - * Converts this AbandonReleaseResponse to JSON. + * Converts this ListAutomationsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @instance * @returns {Object.} JSON object */ - AbandonReleaseResponse.prototype.toJSON = function toJSON() { + ListAutomationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AbandonReleaseResponse + * Gets the default type url for ListAutomationsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AbandonReleaseResponse + * @memberof google.cloud.deploy.v1.ListAutomationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AbandonReleaseResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAutomationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AbandonReleaseResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListAutomationsRequest"; }; - return AbandonReleaseResponse; + return ListAutomationsRequest; })(); - v1.JobRun = (function() { + v1.ListAutomationsResponse = (function() { /** - * Properties of a JobRun. + * Properties of a ListAutomationsResponse. * @memberof google.cloud.deploy.v1 - * @interface IJobRun - * @property {string|null} [name] JobRun name - * @property {string|null} [uid] JobRun uid - * @property {string|null} [phaseId] JobRun phaseId - * @property {string|null} [jobId] JobRun jobId - * @property {google.protobuf.ITimestamp|null} [createTime] JobRun createTime - * @property {google.protobuf.ITimestamp|null} [startTime] JobRun startTime - * @property {google.protobuf.ITimestamp|null} [endTime] JobRun endTime - * @property {google.cloud.deploy.v1.JobRun.State|null} [state] JobRun state - * @property {google.cloud.deploy.v1.IDeployJobRun|null} [deployJobRun] JobRun deployJobRun - * @property {google.cloud.deploy.v1.IVerifyJobRun|null} [verifyJobRun] JobRun verifyJobRun - * @property {google.cloud.deploy.v1.IPredeployJobRun|null} [predeployJobRun] JobRun predeployJobRun - * @property {google.cloud.deploy.v1.IPostdeployJobRun|null} [postdeployJobRun] JobRun postdeployJobRun - * @property {google.cloud.deploy.v1.ICreateChildRolloutJobRun|null} [createChildRolloutJobRun] JobRun createChildRolloutJobRun - * @property {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun|null} [advanceChildRolloutJobRun] JobRun advanceChildRolloutJobRun - * @property {string|null} [etag] JobRun etag + * @interface IListAutomationsResponse + * @property {Array.|null} [automations] ListAutomationsResponse automations + * @property {string|null} [nextPageToken] ListAutomationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListAutomationsResponse unreachable */ /** - * Constructs a new JobRun. + * Constructs a new ListAutomationsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a JobRun. - * @implements IJobRun + * @classdesc Represents a ListAutomationsResponse. + * @implements IListAutomationsResponse * @constructor - * @param {google.cloud.deploy.v1.IJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListAutomationsResponse=} [properties] Properties to set */ - function JobRun(properties) { + function ListAutomationsResponse(properties) { + this.automations = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25608,285 +36702,109 @@ } /** - * JobRun name. - * @member {string} name - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.name = ""; - - /** - * JobRun uid. - * @member {string} uid - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.uid = ""; - - /** - * JobRun phaseId. - * @member {string} phaseId - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.phaseId = ""; - - /** - * JobRun jobId. - * @member {string} jobId - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.jobId = ""; - - /** - * JobRun createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.createTime = null; - - /** - * JobRun startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.startTime = null; - - /** - * JobRun endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.endTime = null; - - /** - * JobRun state. - * @member {google.cloud.deploy.v1.JobRun.State} state - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.state = 0; - - /** - * JobRun deployJobRun. - * @member {google.cloud.deploy.v1.IDeployJobRun|null|undefined} deployJobRun - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.deployJobRun = null; - - /** - * JobRun verifyJobRun. - * @member {google.cloud.deploy.v1.IVerifyJobRun|null|undefined} verifyJobRun - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.verifyJobRun = null; - - /** - * JobRun predeployJobRun. - * @member {google.cloud.deploy.v1.IPredeployJobRun|null|undefined} predeployJobRun - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.predeployJobRun = null; - - /** - * JobRun postdeployJobRun. - * @member {google.cloud.deploy.v1.IPostdeployJobRun|null|undefined} postdeployJobRun - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.postdeployJobRun = null; - - /** - * JobRun createChildRolloutJobRun. - * @member {google.cloud.deploy.v1.ICreateChildRolloutJobRun|null|undefined} createChildRolloutJobRun - * @memberof google.cloud.deploy.v1.JobRun - * @instance - */ - JobRun.prototype.createChildRolloutJobRun = null; - - /** - * JobRun advanceChildRolloutJobRun. - * @member {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun|null|undefined} advanceChildRolloutJobRun - * @memberof google.cloud.deploy.v1.JobRun + * ListAutomationsResponse automations. + * @member {Array.} automations + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @instance */ - JobRun.prototype.advanceChildRolloutJobRun = null; + ListAutomationsResponse.prototype.automations = $util.emptyArray; /** - * JobRun etag. - * @member {string} etag - * @memberof google.cloud.deploy.v1.JobRun + * ListAutomationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @instance */ - JobRun.prototype.etag = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListAutomationsResponse.prototype.nextPageToken = ""; /** - * JobRun jobRun. - * @member {"deployJobRun"|"verifyJobRun"|"predeployJobRun"|"postdeployJobRun"|"createChildRolloutJobRun"|"advanceChildRolloutJobRun"|undefined} jobRun - * @memberof google.cloud.deploy.v1.JobRun + * ListAutomationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @instance */ - Object.defineProperty(JobRun.prototype, "jobRun", { - get: $util.oneOfGetter($oneOfFields = ["deployJobRun", "verifyJobRun", "predeployJobRun", "postdeployJobRun", "createChildRolloutJobRun", "advanceChildRolloutJobRun"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListAutomationsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new JobRun instance using the specified properties. + * Creates a new ListAutomationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static - * @param {google.cloud.deploy.v1.IJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.JobRun} JobRun instance + * @param {google.cloud.deploy.v1.IListAutomationsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListAutomationsResponse} ListAutomationsResponse instance */ - JobRun.create = function create(properties) { - return new JobRun(properties); + ListAutomationsResponse.create = function create(properties) { + return new ListAutomationsResponse(properties); }; /** - * Encodes the specified JobRun message. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. + * Encodes the specified ListAutomationsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static - * @param {google.cloud.deploy.v1.IJobRun} message JobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationsResponse} message ListAutomationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobRun.encode = function encode(message, writer) { + ListAutomationsResponse.encode = function encode(message, writer) { 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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.phaseId); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); - 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.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, 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.deployJobRun != null && Object.hasOwnProperty.call(message, "deployJobRun")) - $root.google.cloud.deploy.v1.DeployJobRun.encode(message.deployJobRun, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.verifyJobRun != null && Object.hasOwnProperty.call(message, "verifyJobRun")) - $root.google.cloud.deploy.v1.VerifyJobRun.encode(message.verifyJobRun, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); - if (message.createChildRolloutJobRun != null && Object.hasOwnProperty.call(message, "createChildRolloutJobRun")) - $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.encode(message.createChildRolloutJobRun, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.advanceChildRolloutJobRun != null && Object.hasOwnProperty.call(message, "advanceChildRolloutJobRun")) - $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.encode(message.advanceChildRolloutJobRun, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.predeployJobRun != null && Object.hasOwnProperty.call(message, "predeployJobRun")) - $root.google.cloud.deploy.v1.PredeployJobRun.encode(message.predeployJobRun, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.postdeployJobRun != null && Object.hasOwnProperty.call(message, "postdeployJobRun")) - $root.google.cloud.deploy.v1.PostdeployJobRun.encode(message.postdeployJobRun, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.automations != null && message.automations.length) + for (var i = 0; i < message.automations.length; ++i) + $root.google.cloud.deploy.v1.Automation.encode(message.automations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified JobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.JobRun.verify|verify} messages. + * Encodes the specified ListAutomationsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static - * @param {google.cloud.deploy.v1.IJobRun} message JobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationsResponse} message ListAutomationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobRun.encodeDelimited = function encodeDelimited(message, writer) { + ListAutomationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JobRun message from the specified reader or buffer. + * Decodes a ListAutomationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.JobRun} JobRun + * @returns {google.cloud.deploy.v1.ListAutomationsResponse} ListAutomationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobRun.decode = function decode(reader, length) { + ListAutomationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.JobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListAutomationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.automations && message.automations.length)) + message.automations = []; + message.automations.push($root.google.cloud.deploy.v1.Automation.decode(reader, reader.uint32())); break; } case 2: { - message.uid = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.phaseId = reader.string(); - break; - } - case 4: { - message.jobId = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.state = reader.int32(); - break; - } - case 9: { - message.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.decode(reader, reader.uint32()); - break; - } - case 10: { - message.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.decode(reader, reader.uint32()); - break; - } - case 14: { - message.predeployJobRun = $root.google.cloud.deploy.v1.PredeployJobRun.decode(reader, reader.uint32()); - break; - } - case 15: { - message.postdeployJobRun = $root.google.cloud.deploy.v1.PostdeployJobRun.decode(reader, reader.uint32()); - break; - } - case 12: { - message.createChildRolloutJobRun = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.decode(reader, reader.uint32()); - break; - } - case 13: { - message.advanceChildRolloutJobRun = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.decode(reader, reader.uint32()); - break; - } - case 11: { - message.etag = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -25898,386 +36816,169 @@ }; /** - * Decodes a JobRun message from the specified reader or buffer, length delimited. + * Decodes a ListAutomationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.JobRun} JobRun + * @returns {google.cloud.deploy.v1.ListAutomationsResponse} ListAutomationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobRun.decodeDelimited = function decodeDelimited(reader) { + ListAutomationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - - /** - * Verifies a JobRun message. - * @function verify - * @memberof google.cloud.deploy.v1.JobRun - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JobRun.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - if (!$util.isString(message.phaseId)) - return "phaseId: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: 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.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.deployJobRun != null && message.hasOwnProperty("deployJobRun")) { - properties.jobRun = 1; - { - var error = $root.google.cloud.deploy.v1.DeployJobRun.verify(message.deployJobRun); - if (error) - return "deployJobRun." + error; - } - } - if (message.verifyJobRun != null && message.hasOwnProperty("verifyJobRun")) { - if (properties.jobRun === 1) - return "jobRun: multiple values"; - properties.jobRun = 1; - { - var error = $root.google.cloud.deploy.v1.VerifyJobRun.verify(message.verifyJobRun); - if (error) - return "verifyJobRun." + error; - } - } - if (message.predeployJobRun != null && message.hasOwnProperty("predeployJobRun")) { - if (properties.jobRun === 1) - return "jobRun: multiple values"; - properties.jobRun = 1; - { - var error = $root.google.cloud.deploy.v1.PredeployJobRun.verify(message.predeployJobRun); - if (error) - return "predeployJobRun." + error; - } - } - if (message.postdeployJobRun != null && message.hasOwnProperty("postdeployJobRun")) { - if (properties.jobRun === 1) - return "jobRun: multiple values"; - properties.jobRun = 1; - { - var error = $root.google.cloud.deploy.v1.PostdeployJobRun.verify(message.postdeployJobRun); - if (error) - return "postdeployJobRun." + error; - } - } - if (message.createChildRolloutJobRun != null && message.hasOwnProperty("createChildRolloutJobRun")) { - if (properties.jobRun === 1) - return "jobRun: multiple values"; - properties.jobRun = 1; - { - var error = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.verify(message.createChildRolloutJobRun); - if (error) - return "createChildRolloutJobRun." + error; - } - } - if (message.advanceChildRolloutJobRun != null && message.hasOwnProperty("advanceChildRolloutJobRun")) { - if (properties.jobRun === 1) - return "jobRun: multiple values"; - properties.jobRun = 1; - { - var error = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.verify(message.advanceChildRolloutJobRun); - if (error) - return "advanceChildRolloutJobRun." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - return null; - }; - - /** - * Creates a JobRun message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.deploy.v1.JobRun - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.JobRun} JobRun - */ - JobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.JobRun) - return object; - var message = new $root.google.cloud.deploy.v1.JobRun(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.phaseId != null) - message.phaseId = String(object.phaseId); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "IN_PROGRESS": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "TERMINATING": - case 4: - message.state = 4; - break; - case "TERMINATED": - case 5: - message.state = 5; - break; - } - if (object.deployJobRun != null) { - if (typeof object.deployJobRun !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.deployJobRun: object expected"); - message.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.fromObject(object.deployJobRun); - } - if (object.verifyJobRun != null) { - if (typeof object.verifyJobRun !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.verifyJobRun: object expected"); - message.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.fromObject(object.verifyJobRun); - } - if (object.predeployJobRun != null) { - if (typeof object.predeployJobRun !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.predeployJobRun: object expected"); - message.predeployJobRun = $root.google.cloud.deploy.v1.PredeployJobRun.fromObject(object.predeployJobRun); + + /** + * Verifies a ListAutomationsResponse message. + * @function verify + * @memberof google.cloud.deploy.v1.ListAutomationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAutomationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.automations != null && message.hasOwnProperty("automations")) { + if (!Array.isArray(message.automations)) + return "automations: array expected"; + for (var i = 0; i < message.automations.length; ++i) { + var error = $root.google.cloud.deploy.v1.Automation.verify(message.automations[i]); + if (error) + return "automations." + error; + } } - if (object.postdeployJobRun != null) { - if (typeof object.postdeployJobRun !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.postdeployJobRun: object expected"); - message.postdeployJobRun = $root.google.cloud.deploy.v1.PostdeployJobRun.fromObject(object.postdeployJobRun); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (object.createChildRolloutJobRun != null) { - if (typeof object.createChildRolloutJobRun !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.createChildRolloutJobRun: object expected"); - message.createChildRolloutJobRun = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.fromObject(object.createChildRolloutJobRun); + return null; + }; + + /** + * Creates a ListAutomationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.ListAutomationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.ListAutomationsResponse} ListAutomationsResponse + */ + ListAutomationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListAutomationsResponse) + return object; + var message = new $root.google.cloud.deploy.v1.ListAutomationsResponse(); + if (object.automations) { + if (!Array.isArray(object.automations)) + throw TypeError(".google.cloud.deploy.v1.ListAutomationsResponse.automations: array expected"); + message.automations = []; + for (var i = 0; i < object.automations.length; ++i) { + if (typeof object.automations[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListAutomationsResponse.automations: object expected"); + message.automations[i] = $root.google.cloud.deploy.v1.Automation.fromObject(object.automations[i]); + } } - if (object.advanceChildRolloutJobRun != null) { - if (typeof object.advanceChildRolloutJobRun !== "object") - throw TypeError(".google.cloud.deploy.v1.JobRun.advanceChildRolloutJobRun: object expected"); - message.advanceChildRolloutJobRun = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.fromObject(object.advanceChildRolloutJobRun); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListAutomationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a JobRun message. Also converts values to other types if specified. + * Creates a plain object from a ListAutomationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static - * @param {google.cloud.deploy.v1.JobRun} message JobRun + * @param {google.cloud.deploy.v1.ListAutomationsResponse} message ListAutomationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JobRun.toObject = function toObject(message, options) { + ListAutomationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.phaseId = ""; - object.jobId = ""; - object.createTime = null; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.phaseId != null && message.hasOwnProperty("phaseId")) - object.phaseId = message.phaseId; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - 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.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.deploy.v1.JobRun.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.JobRun.State[message.state] : message.state; - if (message.deployJobRun != null && message.hasOwnProperty("deployJobRun")) { - object.deployJobRun = $root.google.cloud.deploy.v1.DeployJobRun.toObject(message.deployJobRun, options); - if (options.oneofs) - object.jobRun = "deployJobRun"; - } - if (message.verifyJobRun != null && message.hasOwnProperty("verifyJobRun")) { - object.verifyJobRun = $root.google.cloud.deploy.v1.VerifyJobRun.toObject(message.verifyJobRun, options); - if (options.oneofs) - object.jobRun = "verifyJobRun"; - } - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.createChildRolloutJobRun != null && message.hasOwnProperty("createChildRolloutJobRun")) { - object.createChildRolloutJobRun = $root.google.cloud.deploy.v1.CreateChildRolloutJobRun.toObject(message.createChildRolloutJobRun, options); - if (options.oneofs) - object.jobRun = "createChildRolloutJobRun"; - } - if (message.advanceChildRolloutJobRun != null && message.hasOwnProperty("advanceChildRolloutJobRun")) { - object.advanceChildRolloutJobRun = $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun.toObject(message.advanceChildRolloutJobRun, options); - if (options.oneofs) - object.jobRun = "advanceChildRolloutJobRun"; + if (options.arrays || options.defaults) { + object.automations = []; + object.unreachable = []; } - if (message.predeployJobRun != null && message.hasOwnProperty("predeployJobRun")) { - object.predeployJobRun = $root.google.cloud.deploy.v1.PredeployJobRun.toObject(message.predeployJobRun, options); - if (options.oneofs) - object.jobRun = "predeployJobRun"; + if (options.defaults) + object.nextPageToken = ""; + if (message.automations && message.automations.length) { + object.automations = []; + for (var j = 0; j < message.automations.length; ++j) + object.automations[j] = $root.google.cloud.deploy.v1.Automation.toObject(message.automations[j], options); } - if (message.postdeployJobRun != null && message.hasOwnProperty("postdeployJobRun")) { - object.postdeployJobRun = $root.google.cloud.deploy.v1.PostdeployJobRun.toObject(message.postdeployJobRun, options); - if (options.oneofs) - object.jobRun = "postdeployJobRun"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } return object; }; /** - * Converts this JobRun to JSON. + * Converts this ListAutomationsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @instance * @returns {Object.} JSON object */ - JobRun.prototype.toJSON = function toJSON() { + ListAutomationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JobRun + * Gets the default type url for ListAutomationsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.JobRun + * @memberof google.cloud.deploy.v1.ListAutomationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAutomationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.JobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListAutomationsResponse"; }; - /** - * State enum. - * @name google.cloud.deploy.v1.JobRun.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} IN_PROGRESS=1 IN_PROGRESS value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} TERMINATING=4 TERMINATING value - * @property {number} TERMINATED=5 TERMINATED value - */ - JobRun.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN_PROGRESS"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "TERMINATING"] = 4; - values[valuesById[5] = "TERMINATED"] = 5; - return values; - })(); - - return JobRun; + return ListAutomationsResponse; })(); - v1.DeployJobRun = (function() { + v1.GetAutomationRequest = (function() { /** - * Properties of a DeployJobRun. + * Properties of a GetAutomationRequest. * @memberof google.cloud.deploy.v1 - * @interface IDeployJobRun - * @property {string|null} [build] DeployJobRun build - * @property {google.cloud.deploy.v1.DeployJobRun.FailureCause|null} [failureCause] DeployJobRun failureCause - * @property {string|null} [failureMessage] DeployJobRun failureMessage - * @property {google.cloud.deploy.v1.IDeployJobRunMetadata|null} [metadata] DeployJobRun metadata - * @property {google.cloud.deploy.v1.IDeployArtifact|null} [artifact] DeployJobRun artifact + * @interface IGetAutomationRequest + * @property {string|null} [name] GetAutomationRequest name */ /** - * Constructs a new DeployJobRun. + * Constructs a new GetAutomationRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a DeployJobRun. - * @implements IDeployJobRun + * @classdesc Represents a GetAutomationRequest. + * @implements IGetAutomationRequest * @constructor - * @param {google.cloud.deploy.v1.IDeployJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetAutomationRequest=} [properties] Properties to set */ - function DeployJobRun(properties) { + function GetAutomationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26285,131 +36986,75 @@ } /** - * DeployJobRun build. - * @member {string} build - * @memberof google.cloud.deploy.v1.DeployJobRun - * @instance - */ - DeployJobRun.prototype.build = ""; - - /** - * DeployJobRun failureCause. - * @member {google.cloud.deploy.v1.DeployJobRun.FailureCause} failureCause - * @memberof google.cloud.deploy.v1.DeployJobRun - * @instance - */ - DeployJobRun.prototype.failureCause = 0; - - /** - * DeployJobRun failureMessage. - * @member {string} failureMessage - * @memberof google.cloud.deploy.v1.DeployJobRun - * @instance - */ - DeployJobRun.prototype.failureMessage = ""; - - /** - * DeployJobRun metadata. - * @member {google.cloud.deploy.v1.IDeployJobRunMetadata|null|undefined} metadata - * @memberof google.cloud.deploy.v1.DeployJobRun - * @instance - */ - DeployJobRun.prototype.metadata = null; - - /** - * DeployJobRun artifact. - * @member {google.cloud.deploy.v1.IDeployArtifact|null|undefined} artifact - * @memberof google.cloud.deploy.v1.DeployJobRun + * GetAutomationRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @instance */ - DeployJobRun.prototype.artifact = null; + GetAutomationRequest.prototype.name = ""; /** - * Creates a new DeployJobRun instance using the specified properties. + * Creates a new GetAutomationRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static - * @param {google.cloud.deploy.v1.IDeployJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun instance + * @param {google.cloud.deploy.v1.IGetAutomationRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetAutomationRequest} GetAutomationRequest instance */ - DeployJobRun.create = function create(properties) { - return new DeployJobRun(properties); + GetAutomationRequest.create = function create(properties) { + return new GetAutomationRequest(properties); }; /** - * Encodes the specified DeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. + * Encodes the specified GetAutomationRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static - * @param {google.cloud.deploy.v1.IDeployJobRun} message DeployJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IGetAutomationRequest} message GetAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployJobRun.encode = function encode(message, writer) { + GetAutomationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); - if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); - if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.deploy.v1.DeployJobRunMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.artifact != null && Object.hasOwnProperty.call(message, "artifact")) - $root.google.cloud.deploy.v1.DeployArtifact.encode(message.artifact, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployJobRun.verify|verify} messages. + * Encodes the specified GetAutomationRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static - * @param {google.cloud.deploy.v1.IDeployJobRun} message DeployJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IGetAutomationRequest} message GetAutomationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { + GetAutomationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployJobRun message from the specified reader or buffer. + * Decodes a GetAutomationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun + * @returns {google.cloud.deploy.v1.GetAutomationRequest} GetAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployJobRun.decode = function decode(reader, length) { + GetAutomationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployJobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetAutomationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.build = reader.string(); - break; - } - case 2: { - message.failureCause = reader.int32(); - break; - } - case 3: { - message.failureMessage = reader.string(); - break; - } - case 4: { - message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.decode(reader, reader.uint32()); - break; - } - case 5: { - message.artifact = $root.google.cloud.deploy.v1.DeployArtifact.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -26421,230 +37066,137 @@ }; /** - * Decodes a DeployJobRun message from the specified reader or buffer, length delimited. + * Decodes a GetAutomationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun + * @returns {google.cloud.deploy.v1.GetAutomationRequest} GetAutomationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployJobRun.decodeDelimited = function decodeDelimited(reader) { + GetAutomationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployJobRun message. + * Verifies a GetAutomationRequest message. * @function verify - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployJobRun.verify = function verify(message) { + GetAutomationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - switch (message.failureCause) { - default: - return "failureCause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - if (!$util.isString(message.failureMessage)) - return "failureMessage: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.cloud.deploy.v1.DeployJobRunMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.artifact != null && message.hasOwnProperty("artifact")) { - var error = $root.google.cloud.deploy.v1.DeployArtifact.verify(message.artifact); - if (error) - return "artifact." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DeployJobRun message from a plain object. Also converts values to their respective internal types. + * Creates a GetAutomationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.DeployJobRun} DeployJobRun + * @returns {google.cloud.deploy.v1.GetAutomationRequest} GetAutomationRequest */ - DeployJobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.DeployJobRun) + GetAutomationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetAutomationRequest) return object; - var message = new $root.google.cloud.deploy.v1.DeployJobRun(); - if (object.build != null) - message.build = String(object.build); - switch (object.failureCause) { - default: - if (typeof object.failureCause === "number") { - message.failureCause = object.failureCause; - break; - } - break; - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.failureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.failureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.failureCause = 2; - break; - case "DEADLINE_EXCEEDED": - case 3: - message.failureCause = 3; - break; - case "MISSING_RESOURCES_FOR_CANARY": - case 4: - message.failureCause = 4; - break; - case "CLOUD_BUILD_REQUEST_FAILED": - case 5: - message.failureCause = 5; - break; - } - if (object.failureMessage != null) - message.failureMessage = String(object.failureMessage); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.deploy.v1.DeployJobRun.metadata: object expected"); - message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.fromObject(object.metadata); - } - if (object.artifact != null) { - if (typeof object.artifact !== "object") - throw TypeError(".google.cloud.deploy.v1.DeployJobRun.artifact: object expected"); - message.artifact = $root.google.cloud.deploy.v1.DeployArtifact.fromObject(object.artifact); - } + var message = new $root.google.cloud.deploy.v1.GetAutomationRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeployJobRun message. Also converts values to other types if specified. + * Creates a plain object from a GetAutomationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static - * @param {google.cloud.deploy.v1.DeployJobRun} message DeployJobRun + * @param {google.cloud.deploy.v1.GetAutomationRequest} message GetAutomationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployJobRun.toObject = function toObject(message, options) { + GetAutomationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.build = ""; - object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - object.failureMessage = ""; - object.metadata = null; - object.artifact = null; - } - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.DeployJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.DeployJobRun.FailureCause[message.failureCause] : message.failureCause; - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - object.failureMessage = message.failureMessage; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.toObject(message.metadata, options); - if (message.artifact != null && message.hasOwnProperty("artifact")) - object.artifact = $root.google.cloud.deploy.v1.DeployArtifact.toObject(message.artifact, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DeployJobRun to JSON. + * Converts this GetAutomationRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @instance * @returns {Object.} JSON object */ - DeployJobRun.prototype.toJSON = function toJSON() { + GetAutomationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployJobRun + * Gets the default type url for GetAutomationRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.DeployJobRun + * @memberof google.cloud.deploy.v1.GetAutomationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAutomationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.DeployJobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetAutomationRequest"; }; - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.DeployJobRun.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value - * @property {number} MISSING_RESOURCES_FOR_CANARY=4 MISSING_RESOURCES_FOR_CANARY value - * @property {number} CLOUD_BUILD_REQUEST_FAILED=5 CLOUD_BUILD_REQUEST_FAILED value - */ - DeployJobRun.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; - values[valuesById[4] = "MISSING_RESOURCES_FOR_CANARY"] = 4; - values[valuesById[5] = "CLOUD_BUILD_REQUEST_FAILED"] = 5; - return values; - })(); - - return DeployJobRun; + return GetAutomationRequest; })(); - v1.VerifyJobRun = (function() { + v1.AutomationRun = (function() { /** - * Properties of a VerifyJobRun. + * Properties of an AutomationRun. * @memberof google.cloud.deploy.v1 - * @interface IVerifyJobRun - * @property {string|null} [build] VerifyJobRun build - * @property {string|null} [artifactUri] VerifyJobRun artifactUri - * @property {string|null} [eventLogPath] VerifyJobRun eventLogPath - * @property {google.cloud.deploy.v1.VerifyJobRun.FailureCause|null} [failureCause] VerifyJobRun failureCause - * @property {string|null} [failureMessage] VerifyJobRun failureMessage - */ - - /** - * Constructs a new VerifyJobRun. + * @interface IAutomationRun + * @property {string|null} [name] AutomationRun name + * @property {google.protobuf.ITimestamp|null} [createTime] AutomationRun createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AutomationRun updateTime + * @property {string|null} [etag] AutomationRun etag + * @property {string|null} [serviceAccount] AutomationRun serviceAccount + * @property {google.cloud.deploy.v1.IAutomation|null} [automationSnapshot] AutomationRun automationSnapshot + * @property {string|null} [targetId] AutomationRun targetId + * @property {google.cloud.deploy.v1.AutomationRun.State|null} [state] AutomationRun state + * @property {string|null} [stateDescription] AutomationRun stateDescription + * @property {google.protobuf.ITimestamp|null} [expireTime] AutomationRun expireTime + * @property {string|null} [ruleId] AutomationRun ruleId + * @property {string|null} [automationId] AutomationRun automationId + * @property {google.cloud.deploy.v1.IPromoteReleaseOperation|null} [promoteReleaseOperation] AutomationRun promoteReleaseOperation + * @property {google.cloud.deploy.v1.IAdvanceRolloutOperation|null} [advanceRolloutOperation] AutomationRun advanceRolloutOperation + * @property {google.cloud.deploy.v1.IRepairRolloutOperation|null} [repairRolloutOperation] AutomationRun repairRolloutOperation + * @property {google.protobuf.ITimestamp|null} [waitUntilTime] AutomationRun waitUntilTime + */ + + /** + * Constructs a new AutomationRun. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a VerifyJobRun. - * @implements IVerifyJobRun + * @classdesc Represents an AutomationRun. + * @implements IAutomationRun * @constructor - * @param {google.cloud.deploy.v1.IVerifyJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAutomationRun=} [properties] Properties to set */ - function VerifyJobRun(properties) { + function AutomationRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26652,131 +37204,299 @@ } /** - * VerifyJobRun build. - * @member {string} build - * @memberof google.cloud.deploy.v1.VerifyJobRun + * AutomationRun name. + * @member {string} name + * @memberof google.cloud.deploy.v1.AutomationRun * @instance */ - VerifyJobRun.prototype.build = ""; + AutomationRun.prototype.name = ""; /** - * VerifyJobRun artifactUri. - * @member {string} artifactUri - * @memberof google.cloud.deploy.v1.VerifyJobRun + * AutomationRun createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.deploy.v1.AutomationRun * @instance */ - VerifyJobRun.prototype.artifactUri = ""; + AutomationRun.prototype.createTime = null; /** - * VerifyJobRun eventLogPath. - * @member {string} eventLogPath - * @memberof google.cloud.deploy.v1.VerifyJobRun + * AutomationRun updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.deploy.v1.AutomationRun * @instance */ - VerifyJobRun.prototype.eventLogPath = ""; + AutomationRun.prototype.updateTime = null; /** - * VerifyJobRun failureCause. - * @member {google.cloud.deploy.v1.VerifyJobRun.FailureCause} failureCause - * @memberof google.cloud.deploy.v1.VerifyJobRun + * AutomationRun etag. + * @member {string} etag + * @memberof google.cloud.deploy.v1.AutomationRun * @instance */ - VerifyJobRun.prototype.failureCause = 0; + AutomationRun.prototype.etag = ""; /** - * VerifyJobRun failureMessage. - * @member {string} failureMessage - * @memberof google.cloud.deploy.v1.VerifyJobRun + * AutomationRun serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.deploy.v1.AutomationRun * @instance */ - VerifyJobRun.prototype.failureMessage = ""; + AutomationRun.prototype.serviceAccount = ""; /** - * Creates a new VerifyJobRun instance using the specified properties. + * AutomationRun automationSnapshot. + * @member {google.cloud.deploy.v1.IAutomation|null|undefined} automationSnapshot + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.automationSnapshot = null; + + /** + * AutomationRun targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.targetId = ""; + + /** + * AutomationRun state. + * @member {google.cloud.deploy.v1.AutomationRun.State} state + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.state = 0; + + /** + * AutomationRun stateDescription. + * @member {string} stateDescription + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.stateDescription = ""; + + /** + * AutomationRun expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.expireTime = null; + + /** + * AutomationRun ruleId. + * @member {string} ruleId + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.ruleId = ""; + + /** + * AutomationRun automationId. + * @member {string} automationId + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.automationId = ""; + + /** + * AutomationRun promoteReleaseOperation. + * @member {google.cloud.deploy.v1.IPromoteReleaseOperation|null|undefined} promoteReleaseOperation + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.promoteReleaseOperation = null; + + /** + * AutomationRun advanceRolloutOperation. + * @member {google.cloud.deploy.v1.IAdvanceRolloutOperation|null|undefined} advanceRolloutOperation + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.advanceRolloutOperation = null; + + /** + * AutomationRun repairRolloutOperation. + * @member {google.cloud.deploy.v1.IRepairRolloutOperation|null|undefined} repairRolloutOperation + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.repairRolloutOperation = null; + + /** + * AutomationRun waitUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} waitUntilTime + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + AutomationRun.prototype.waitUntilTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AutomationRun operation. + * @member {"promoteReleaseOperation"|"advanceRolloutOperation"|"repairRolloutOperation"|undefined} operation + * @memberof google.cloud.deploy.v1.AutomationRun + * @instance + */ + Object.defineProperty(AutomationRun.prototype, "operation", { + get: $util.oneOfGetter($oneOfFields = ["promoteReleaseOperation", "advanceRolloutOperation", "repairRolloutOperation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AutomationRun instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static - * @param {google.cloud.deploy.v1.IVerifyJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun instance + * @param {google.cloud.deploy.v1.IAutomationRun=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AutomationRun} AutomationRun instance */ - VerifyJobRun.create = function create(properties) { - return new VerifyJobRun(properties); + AutomationRun.create = function create(properties) { + return new AutomationRun(properties); }; /** - * Encodes the specified VerifyJobRun message. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. + * Encodes the specified AutomationRun message. Does not implicitly {@link google.cloud.deploy.v1.AutomationRun.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static - * @param {google.cloud.deploy.v1.IVerifyJobRun} message VerifyJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationRun} message AutomationRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyJobRun.encode = function encode(message, writer) { + AutomationRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); - if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.artifactUri); - if (message.eventLogPath != null && Object.hasOwnProperty.call(message, "eventLogPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.eventLogPath); - if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.failureCause); - if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.failureMessage); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.automationSnapshot != null && Object.hasOwnProperty.call(message, "automationSnapshot")) + $root.google.cloud.deploy.v1.Automation.encode(message.automationSnapshot, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.stateDescription != null && Object.hasOwnProperty.call(message, "stateDescription")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.stateDescription); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.ruleId); + if (message.promoteReleaseOperation != null && Object.hasOwnProperty.call(message, "promoteReleaseOperation")) + $root.google.cloud.deploy.v1.PromoteReleaseOperation.encode(message.promoteReleaseOperation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.advanceRolloutOperation != null && Object.hasOwnProperty.call(message, "advanceRolloutOperation")) + $root.google.cloud.deploy.v1.AdvanceRolloutOperation.encode(message.advanceRolloutOperation, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.automationId != null && Object.hasOwnProperty.call(message, "automationId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.automationId); + if (message.waitUntilTime != null && Object.hasOwnProperty.call(message, "waitUntilTime")) + $root.google.protobuf.Timestamp.encode(message.waitUntilTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.repairRolloutOperation != null && Object.hasOwnProperty.call(message, "repairRolloutOperation")) + $root.google.cloud.deploy.v1.RepairRolloutOperation.encode(message.repairRolloutOperation, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; /** - * Encodes the specified VerifyJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.VerifyJobRun.verify|verify} messages. + * Encodes the specified AutomationRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AutomationRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static - * @param {google.cloud.deploy.v1.IVerifyJobRun} message VerifyJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IAutomationRun} message AutomationRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyJobRun.encodeDelimited = function encodeDelimited(message, writer) { + AutomationRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerifyJobRun message from the specified reader or buffer. + * Decodes an AutomationRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun + * @returns {google.cloud.deploy.v1.AutomationRun} AutomationRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyJobRun.decode = function decode(reader, length) { + AutomationRun.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.VerifyJobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AutomationRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.build = reader.string(); + message.name = reader.string(); break; } case 2: { - message.artifactUri = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.eventLogPath = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.failureCause = reader.int32(); + message.etag = reader.string(); break; } case 5: { - message.failureMessage = reader.string(); + message.serviceAccount = reader.string(); + break; + } + case 6: { + message.automationSnapshot = $root.google.cloud.deploy.v1.Automation.decode(reader, reader.uint32()); + break; + } + case 7: { + message.targetId = reader.string(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + message.stateDescription = reader.string(); + break; + } + case 11: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.ruleId = reader.string(); + break; + } + case 15: { + message.automationId = reader.string(); + break; + } + case 13: { + message.promoteReleaseOperation = $root.google.cloud.deploy.v1.PromoteReleaseOperation.decode(reader, reader.uint32()); + break; + } + case 14: { + message.advanceRolloutOperation = $root.google.cloud.deploy.v1.AdvanceRolloutOperation.decode(reader, reader.uint32()); + break; + } + case 17: { + message.repairRolloutOperation = $root.google.cloud.deploy.v1.RepairRolloutOperation.decode(reader, reader.uint32()); + break; + } + case 16: { + message.waitUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -26788,45 +37508,64 @@ }; /** - * Decodes a VerifyJobRun message from the specified reader or buffer, length delimited. + * Decodes an AutomationRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun + * @returns {google.cloud.deploy.v1.AutomationRun} AutomationRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyJobRun.decodeDelimited = function decodeDelimited(reader) { + AutomationRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerifyJobRun message. + * Verifies an AutomationRun message. * @function verify - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VerifyJobRun.verify = function verify(message) { + AutomationRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) - if (!$util.isString(message.artifactUri)) - return "artifactUri: string expected"; - if (message.eventLogPath != null && message.hasOwnProperty("eventLogPath")) - if (!$util.isString(message.eventLogPath)) - return "eventLogPath: string expected"; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - switch (message.failureCause) { + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.automationSnapshot != null && message.hasOwnProperty("automationSnapshot")) { + var error = $root.google.cloud.deploy.v1.Automation.verify(message.automationSnapshot); + if (error) + return "automationSnapshot." + error; + } + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "failureCause: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: @@ -26835,171 +37574,301 @@ case 5: break; } - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - if (!$util.isString(message.failureMessage)) - return "failureMessage: string expected"; + if (message.stateDescription != null && message.hasOwnProperty("stateDescription")) + if (!$util.isString(message.stateDescription)) + return "stateDescription: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.automationId != null && message.hasOwnProperty("automationId")) + if (!$util.isString(message.automationId)) + return "automationId: string expected"; + if (message.promoteReleaseOperation != null && message.hasOwnProperty("promoteReleaseOperation")) { + properties.operation = 1; + { + var error = $root.google.cloud.deploy.v1.PromoteReleaseOperation.verify(message.promoteReleaseOperation); + if (error) + return "promoteReleaseOperation." + error; + } + } + if (message.advanceRolloutOperation != null && message.hasOwnProperty("advanceRolloutOperation")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + { + var error = $root.google.cloud.deploy.v1.AdvanceRolloutOperation.verify(message.advanceRolloutOperation); + if (error) + return "advanceRolloutOperation." + error; + } + } + if (message.repairRolloutOperation != null && message.hasOwnProperty("repairRolloutOperation")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + { + var error = $root.google.cloud.deploy.v1.RepairRolloutOperation.verify(message.repairRolloutOperation); + if (error) + return "repairRolloutOperation." + error; + } + } + if (message.waitUntilTime != null && message.hasOwnProperty("waitUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.waitUntilTime); + if (error) + return "waitUntilTime." + error; + } return null; }; /** - * Creates a VerifyJobRun message from a plain object. Also converts values to their respective internal types. + * Creates an AutomationRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.VerifyJobRun} VerifyJobRun + * @returns {google.cloud.deploy.v1.AutomationRun} AutomationRun */ - VerifyJobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.VerifyJobRun) + AutomationRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AutomationRun) return object; - var message = new $root.google.cloud.deploy.v1.VerifyJobRun(); - if (object.build != null) - message.build = String(object.build); - if (object.artifactUri != null) - message.artifactUri = String(object.artifactUri); - if (object.eventLogPath != null) - message.eventLogPath = String(object.eventLogPath); - switch (object.failureCause) { + var message = new $root.google.cloud.deploy.v1.AutomationRun(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.automationSnapshot != null) { + if (typeof object.automationSnapshot !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.automationSnapshot: object expected"); + message.automationSnapshot = $root.google.cloud.deploy.v1.Automation.fromObject(object.automationSnapshot); + } + if (object.targetId != null) + message.targetId = String(object.targetId); + switch (object.state) { default: - if (typeof object.failureCause === "number") { - message.failureCause = object.failureCause; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "FAILURE_CAUSE_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.failureCause = 0; + message.state = 0; break; - case "CLOUD_BUILD_UNAVAILABLE": + case "SUCCEEDED": case 1: - message.failureCause = 1; + message.state = 1; break; - case "EXECUTION_FAILED": + case "CANCELLED": case 2: - message.failureCause = 2; + message.state = 2; break; - case "DEADLINE_EXCEEDED": + case "FAILED": case 3: - message.failureCause = 3; + message.state = 3; break; - case "VERIFICATION_CONFIG_NOT_FOUND": + case "IN_PROGRESS": case 4: - message.failureCause = 4; + message.state = 4; break; - case "CLOUD_BUILD_REQUEST_FAILED": + case "PENDING": case 5: - message.failureCause = 5; + message.state = 5; break; } - if (object.failureMessage != null) - message.failureMessage = String(object.failureMessage); + if (object.stateDescription != null) + message.stateDescription = String(object.stateDescription); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.automationId != null) + message.automationId = String(object.automationId); + if (object.promoteReleaseOperation != null) { + if (typeof object.promoteReleaseOperation !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.promoteReleaseOperation: object expected"); + message.promoteReleaseOperation = $root.google.cloud.deploy.v1.PromoteReleaseOperation.fromObject(object.promoteReleaseOperation); + } + if (object.advanceRolloutOperation != null) { + if (typeof object.advanceRolloutOperation !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.advanceRolloutOperation: object expected"); + message.advanceRolloutOperation = $root.google.cloud.deploy.v1.AdvanceRolloutOperation.fromObject(object.advanceRolloutOperation); + } + if (object.repairRolloutOperation != null) { + if (typeof object.repairRolloutOperation !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.repairRolloutOperation: object expected"); + message.repairRolloutOperation = $root.google.cloud.deploy.v1.RepairRolloutOperation.fromObject(object.repairRolloutOperation); + } + if (object.waitUntilTime != null) { + if (typeof object.waitUntilTime !== "object") + throw TypeError(".google.cloud.deploy.v1.AutomationRun.waitUntilTime: object expected"); + message.waitUntilTime = $root.google.protobuf.Timestamp.fromObject(object.waitUntilTime); + } return message; }; /** - * Creates a plain object from a VerifyJobRun message. Also converts values to other types if specified. + * Creates a plain object from an AutomationRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static - * @param {google.cloud.deploy.v1.VerifyJobRun} message VerifyJobRun + * @param {google.cloud.deploy.v1.AutomationRun} message AutomationRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerifyJobRun.toObject = function toObject(message, options) { + AutomationRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.build = ""; - object.artifactUri = ""; - object.eventLogPath = ""; - object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - object.failureMessage = ""; + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.serviceAccount = ""; + object.automationSnapshot = null; + object.targetId = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.stateDescription = ""; + object.expireTime = null; + object.ruleId = ""; + object.automationId = ""; + object.waitUntilTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.automationSnapshot != null && message.hasOwnProperty("automationSnapshot")) + object.automationSnapshot = $root.google.cloud.deploy.v1.Automation.toObject(message.automationSnapshot, options); + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.AutomationRun.State[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.AutomationRun.State[message.state] : message.state; + if (message.stateDescription != null && message.hasOwnProperty("stateDescription")) + object.stateDescription = message.stateDescription; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.promoteReleaseOperation != null && message.hasOwnProperty("promoteReleaseOperation")) { + object.promoteReleaseOperation = $root.google.cloud.deploy.v1.PromoteReleaseOperation.toObject(message.promoteReleaseOperation, options); + if (options.oneofs) + object.operation = "promoteReleaseOperation"; + } + if (message.advanceRolloutOperation != null && message.hasOwnProperty("advanceRolloutOperation")) { + object.advanceRolloutOperation = $root.google.cloud.deploy.v1.AdvanceRolloutOperation.toObject(message.advanceRolloutOperation, options); + if (options.oneofs) + object.operation = "advanceRolloutOperation"; + } + if (message.automationId != null && message.hasOwnProperty("automationId")) + object.automationId = message.automationId; + if (message.waitUntilTime != null && message.hasOwnProperty("waitUntilTime")) + object.waitUntilTime = $root.google.protobuf.Timestamp.toObject(message.waitUntilTime, options); + if (message.repairRolloutOperation != null && message.hasOwnProperty("repairRolloutOperation")) { + object.repairRolloutOperation = $root.google.cloud.deploy.v1.RepairRolloutOperation.toObject(message.repairRolloutOperation, options); + if (options.oneofs) + object.operation = "repairRolloutOperation"; } - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) - object.artifactUri = message.artifactUri; - if (message.eventLogPath != null && message.hasOwnProperty("eventLogPath")) - object.eventLogPath = message.eventLogPath; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.VerifyJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.VerifyJobRun.FailureCause[message.failureCause] : message.failureCause; - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - object.failureMessage = message.failureMessage; return object; }; /** - * Converts this VerifyJobRun to JSON. + * Converts this AutomationRun to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @instance * @returns {Object.} JSON object */ - VerifyJobRun.prototype.toJSON = function toJSON() { + AutomationRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VerifyJobRun + * Gets the default type url for AutomationRun * @function getTypeUrl - * @memberof google.cloud.deploy.v1.VerifyJobRun + * @memberof google.cloud.deploy.v1.AutomationRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VerifyJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AutomationRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.VerifyJobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AutomationRun"; }; /** - * FailureCause enum. - * @name google.cloud.deploy.v1.VerifyJobRun.FailureCause + * State enum. + * @name google.cloud.deploy.v1.AutomationRun.State * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value - * @property {number} VERIFICATION_CONFIG_NOT_FOUND=4 VERIFICATION_CONFIG_NOT_FOUND value - * @property {number} CLOUD_BUILD_REQUEST_FAILED=5 CLOUD_BUILD_REQUEST_FAILED value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} CANCELLED=2 CANCELLED value + * @property {number} FAILED=3 FAILED value + * @property {number} IN_PROGRESS=4 IN_PROGRESS value + * @property {number} PENDING=5 PENDING value */ - VerifyJobRun.FailureCause = (function() { + AutomationRun.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; - values[valuesById[4] = "VERIFICATION_CONFIG_NOT_FOUND"] = 4; - values[valuesById[5] = "CLOUD_BUILD_REQUEST_FAILED"] = 5; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "CANCELLED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "IN_PROGRESS"] = 4; + values[valuesById[5] = "PENDING"] = 5; return values; })(); - return VerifyJobRun; + return AutomationRun; })(); - v1.PredeployJobRun = (function() { + v1.PromoteReleaseOperation = (function() { /** - * Properties of a PredeployJobRun. + * Properties of a PromoteReleaseOperation. * @memberof google.cloud.deploy.v1 - * @interface IPredeployJobRun - * @property {string|null} [build] PredeployJobRun build - * @property {google.cloud.deploy.v1.PredeployJobRun.FailureCause|null} [failureCause] PredeployJobRun failureCause - * @property {string|null} [failureMessage] PredeployJobRun failureMessage + * @interface IPromoteReleaseOperation + * @property {string|null} [targetId] PromoteReleaseOperation targetId + * @property {google.protobuf.IDuration|null} [wait] PromoteReleaseOperation wait + * @property {string|null} [rollout] PromoteReleaseOperation rollout + * @property {string|null} [phase] PromoteReleaseOperation phase */ /** - * Constructs a new PredeployJobRun. + * Constructs a new PromoteReleaseOperation. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PredeployJobRun. - * @implements IPredeployJobRun + * @classdesc Represents a PromoteReleaseOperation. + * @implements IPromoteReleaseOperation * @constructor - * @param {google.cloud.deploy.v1.IPredeployJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IPromoteReleaseOperation=} [properties] Properties to set */ - function PredeployJobRun(properties) { + function PromoteReleaseOperation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27007,103 +37876,117 @@ } /** - * PredeployJobRun build. - * @member {string} build - * @memberof google.cloud.deploy.v1.PredeployJobRun + * PromoteReleaseOperation targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @instance */ - PredeployJobRun.prototype.build = ""; + PromoteReleaseOperation.prototype.targetId = ""; /** - * PredeployJobRun failureCause. - * @member {google.cloud.deploy.v1.PredeployJobRun.FailureCause} failureCause - * @memberof google.cloud.deploy.v1.PredeployJobRun + * PromoteReleaseOperation wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @instance */ - PredeployJobRun.prototype.failureCause = 0; + PromoteReleaseOperation.prototype.wait = null; /** - * PredeployJobRun failureMessage. - * @member {string} failureMessage - * @memberof google.cloud.deploy.v1.PredeployJobRun + * PromoteReleaseOperation rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @instance */ - PredeployJobRun.prototype.failureMessage = ""; + PromoteReleaseOperation.prototype.rollout = ""; /** - * Creates a new PredeployJobRun instance using the specified properties. + * PromoteReleaseOperation phase. + * @member {string} phase + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation + * @instance + */ + PromoteReleaseOperation.prototype.phase = ""; + + /** + * Creates a new PromoteReleaseOperation instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static - * @param {google.cloud.deploy.v1.IPredeployJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun instance + * @param {google.cloud.deploy.v1.IPromoteReleaseOperation=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.PromoteReleaseOperation} PromoteReleaseOperation instance */ - PredeployJobRun.create = function create(properties) { - return new PredeployJobRun(properties); + PromoteReleaseOperation.create = function create(properties) { + return new PromoteReleaseOperation(properties); }; /** - * Encodes the specified PredeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.PredeployJobRun.verify|verify} messages. + * Encodes the specified PromoteReleaseOperation message. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseOperation.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static - * @param {google.cloud.deploy.v1.IPredeployJobRun} message PredeployJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IPromoteReleaseOperation} message PromoteReleaseOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredeployJobRun.encode = function encode(message, writer) { + PromoteReleaseOperation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); - if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); - if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetId); + if (message.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rollout); + if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phase); return writer; }; /** - * Encodes the specified PredeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PredeployJobRun.verify|verify} messages. + * Encodes the specified PromoteReleaseOperation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PromoteReleaseOperation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static - * @param {google.cloud.deploy.v1.IPredeployJobRun} message PredeployJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IPromoteReleaseOperation} message PromoteReleaseOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PredeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { + PromoteReleaseOperation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PredeployJobRun message from the specified reader or buffer. + * Decodes a PromoteReleaseOperation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun + * @returns {google.cloud.deploy.v1.PromoteReleaseOperation} PromoteReleaseOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredeployJobRun.decode = function decode(reader, length) { + PromoteReleaseOperation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PredeployJobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PromoteReleaseOperation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.build = reader.string(); + message.targetId = reader.string(); break; } case 2: { - message.failureCause = reader.int32(); + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 3: { - message.failureMessage = reader.string(); + message.rollout = reader.string(); + break; + } + case 4: { + message.phase = reader.string(); break; } default: @@ -27115,195 +37998,155 @@ }; /** - * Decodes a PredeployJobRun message from the specified reader or buffer, length delimited. + * Decodes a PromoteReleaseOperation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun + * @returns {google.cloud.deploy.v1.PromoteReleaseOperation} PromoteReleaseOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PredeployJobRun.decodeDelimited = function decodeDelimited(reader) { + PromoteReleaseOperation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PredeployJobRun message. + * Verifies a PromoteReleaseOperation message. * @function verify - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PredeployJobRun.verify = function verify(message) { + PromoteReleaseOperation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - switch (message.failureCause) { - default: - return "failureCause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - if (!$util.isString(message.failureMessage)) - return "failureMessage: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.phase != null && message.hasOwnProperty("phase")) + if (!$util.isString(message.phase)) + return "phase: string expected"; return null; }; /** - * Creates a PredeployJobRun message from a plain object. Also converts values to their respective internal types. + * Creates a PromoteReleaseOperation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PredeployJobRun} PredeployJobRun + * @returns {google.cloud.deploy.v1.PromoteReleaseOperation} PromoteReleaseOperation */ - PredeployJobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PredeployJobRun) + PromoteReleaseOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.PromoteReleaseOperation) return object; - var message = new $root.google.cloud.deploy.v1.PredeployJobRun(); - if (object.build != null) - message.build = String(object.build); - switch (object.failureCause) { - default: - if (typeof object.failureCause === "number") { - message.failureCause = object.failureCause; - break; - } - break; - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.failureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.failureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.failureCause = 2; - break; - case "DEADLINE_EXCEEDED": - case 3: - message.failureCause = 3; - break; - case "CLOUD_BUILD_REQUEST_FAILED": - case 4: - message.failureCause = 4; - break; + var message = new $root.google.cloud.deploy.v1.PromoteReleaseOperation(); + if (object.targetId != null) + message.targetId = String(object.targetId); + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.PromoteReleaseOperation.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); } - if (object.failureMessage != null) - message.failureMessage = String(object.failureMessage); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.phase != null) + message.phase = String(object.phase); return message; }; /** - * Creates a plain object from a PredeployJobRun message. Also converts values to other types if specified. + * Creates a plain object from a PromoteReleaseOperation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static - * @param {google.cloud.deploy.v1.PredeployJobRun} message PredeployJobRun + * @param {google.cloud.deploy.v1.PromoteReleaseOperation} message PromoteReleaseOperation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PredeployJobRun.toObject = function toObject(message, options) { + PromoteReleaseOperation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.build = ""; - object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - object.failureMessage = ""; + object.targetId = ""; + object.wait = null; + object.rollout = ""; + object.phase = ""; } - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.PredeployJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.PredeployJobRun.FailureCause[message.failureCause] : message.failureCause; - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - object.failureMessage = message.failureMessage; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.phase != null && message.hasOwnProperty("phase")) + object.phase = message.phase; return object; }; /** - * Converts this PredeployJobRun to JSON. + * Converts this PromoteReleaseOperation to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @instance * @returns {Object.} JSON object */ - PredeployJobRun.prototype.toJSON = function toJSON() { + PromoteReleaseOperation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PredeployJobRun + * Gets the default type url for PromoteReleaseOperation * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PredeployJobRun + * @memberof google.cloud.deploy.v1.PromoteReleaseOperation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PredeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PromoteReleaseOperation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PredeployJobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.PromoteReleaseOperation"; }; - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.PredeployJobRun.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value - * @property {number} CLOUD_BUILD_REQUEST_FAILED=4 CLOUD_BUILD_REQUEST_FAILED value - */ - PredeployJobRun.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; - values[valuesById[4] = "CLOUD_BUILD_REQUEST_FAILED"] = 4; - return values; - })(); - - return PredeployJobRun; + return PromoteReleaseOperation; })(); - v1.PostdeployJobRun = (function() { + v1.AdvanceRolloutOperation = (function() { /** - * Properties of a PostdeployJobRun. + * Properties of an AdvanceRolloutOperation. * @memberof google.cloud.deploy.v1 - * @interface IPostdeployJobRun - * @property {string|null} [build] PostdeployJobRun build - * @property {google.cloud.deploy.v1.PostdeployJobRun.FailureCause|null} [failureCause] PostdeployJobRun failureCause - * @property {string|null} [failureMessage] PostdeployJobRun failureMessage + * @interface IAdvanceRolloutOperation + * @property {string|null} [sourcePhase] AdvanceRolloutOperation sourcePhase + * @property {google.protobuf.IDuration|null} [wait] AdvanceRolloutOperation wait + * @property {string|null} [rollout] AdvanceRolloutOperation rollout + * @property {string|null} [destinationPhase] AdvanceRolloutOperation destinationPhase */ /** - * Constructs a new PostdeployJobRun. + * Constructs a new AdvanceRolloutOperation. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a PostdeployJobRun. - * @implements IPostdeployJobRun + * @classdesc Represents an AdvanceRolloutOperation. + * @implements IAdvanceRolloutOperation * @constructor - * @param {google.cloud.deploy.v1.IPostdeployJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IAdvanceRolloutOperation=} [properties] Properties to set */ - function PostdeployJobRun(properties) { + function AdvanceRolloutOperation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27311,103 +38154,117 @@ } /** - * PostdeployJobRun build. - * @member {string} build - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * AdvanceRolloutOperation sourcePhase. + * @member {string} sourcePhase + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @instance */ - PostdeployJobRun.prototype.build = ""; + AdvanceRolloutOperation.prototype.sourcePhase = ""; /** - * PostdeployJobRun failureCause. - * @member {google.cloud.deploy.v1.PostdeployJobRun.FailureCause} failureCause - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * AdvanceRolloutOperation wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @instance */ - PostdeployJobRun.prototype.failureCause = 0; + AdvanceRolloutOperation.prototype.wait = null; /** - * PostdeployJobRun failureMessage. - * @member {string} failureMessage - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * AdvanceRolloutOperation rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @instance */ - PostdeployJobRun.prototype.failureMessage = ""; + AdvanceRolloutOperation.prototype.rollout = ""; /** - * Creates a new PostdeployJobRun instance using the specified properties. + * AdvanceRolloutOperation destinationPhase. + * @member {string} destinationPhase + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation + * @instance + */ + AdvanceRolloutOperation.prototype.destinationPhase = ""; + + /** + * Creates a new AdvanceRolloutOperation instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static - * @param {google.cloud.deploy.v1.IPostdeployJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun instance + * @param {google.cloud.deploy.v1.IAdvanceRolloutOperation=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.AdvanceRolloutOperation} AdvanceRolloutOperation instance */ - PostdeployJobRun.create = function create(properties) { - return new PostdeployJobRun(properties); + AdvanceRolloutOperation.create = function create(properties) { + return new AdvanceRolloutOperation(properties); }; /** - * Encodes the specified PostdeployJobRun message. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJobRun.verify|verify} messages. + * Encodes the specified AdvanceRolloutOperation message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutOperation.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static - * @param {google.cloud.deploy.v1.IPostdeployJobRun} message PostdeployJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutOperation} message AdvanceRolloutOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostdeployJobRun.encode = function encode(message, writer) { + AdvanceRolloutOperation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.build); - if (message.failureCause != null && Object.hasOwnProperty.call(message, "failureCause")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failureCause); - if (message.failureMessage != null && Object.hasOwnProperty.call(message, "failureMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); + if (message.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rollout); + if (message.destinationPhase != null && Object.hasOwnProperty.call(message, "destinationPhase")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationPhase); + if (message.sourcePhase != null && Object.hasOwnProperty.call(message, "sourcePhase")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourcePhase); return writer; }; /** - * Encodes the specified PostdeployJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.PostdeployJobRun.verify|verify} messages. + * Encodes the specified AdvanceRolloutOperation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceRolloutOperation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static - * @param {google.cloud.deploy.v1.IPostdeployJobRun} message PostdeployJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IAdvanceRolloutOperation} message AdvanceRolloutOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostdeployJobRun.encodeDelimited = function encodeDelimited(message, writer) { + AdvanceRolloutOperation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostdeployJobRun message from the specified reader or buffer. + * Decodes an AdvanceRolloutOperation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun + * @returns {google.cloud.deploy.v1.AdvanceRolloutOperation} AdvanceRolloutOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostdeployJobRun.decode = function decode(reader, length) { + AdvanceRolloutOperation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.PostdeployJobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceRolloutOperation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.build = reader.string(); + case 5: { + message.sourcePhase = reader.string(); break; } case 2: { - message.failureCause = reader.int32(); + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.rollout = reader.string(); break; } - case 3: { - message.failureMessage = reader.string(); + case 4: { + message.destinationPhase = reader.string(); break; } default: @@ -27419,194 +38276,155 @@ }; /** - * Decodes a PostdeployJobRun message from the specified reader or buffer, length delimited. + * Decodes an AdvanceRolloutOperation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun + * @returns {google.cloud.deploy.v1.AdvanceRolloutOperation} AdvanceRolloutOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostdeployJobRun.decodeDelimited = function decodeDelimited(reader) { + AdvanceRolloutOperation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostdeployJobRun message. + * Verifies an AdvanceRolloutOperation message. * @function verify - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostdeployJobRun.verify = function verify(message) { + AdvanceRolloutOperation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.build != null && message.hasOwnProperty("build")) - if (!$util.isString(message.build)) - return "build: string expected"; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - switch (message.failureCause) { - default: - return "failureCause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - if (!$util.isString(message.failureMessage)) - return "failureMessage: string expected"; + if (message.sourcePhase != null && message.hasOwnProperty("sourcePhase")) + if (!$util.isString(message.sourcePhase)) + return "sourcePhase: string expected"; + if (message.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; + } + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + if (!$util.isString(message.destinationPhase)) + return "destinationPhase: string expected"; return null; }; /** - * Creates a PostdeployJobRun message from a plain object. Also converts values to their respective internal types. + * Creates an AdvanceRolloutOperation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.PostdeployJobRun} PostdeployJobRun + * @returns {google.cloud.deploy.v1.AdvanceRolloutOperation} AdvanceRolloutOperation */ - PostdeployJobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.PostdeployJobRun) + AdvanceRolloutOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.AdvanceRolloutOperation) return object; - var message = new $root.google.cloud.deploy.v1.PostdeployJobRun(); - if (object.build != null) - message.build = String(object.build); - switch (object.failureCause) { - default: - if (typeof object.failureCause === "number") { - message.failureCause = object.failureCause; - break; - } - break; - case "FAILURE_CAUSE_UNSPECIFIED": - case 0: - message.failureCause = 0; - break; - case "CLOUD_BUILD_UNAVAILABLE": - case 1: - message.failureCause = 1; - break; - case "EXECUTION_FAILED": - case 2: - message.failureCause = 2; - break; - case "DEADLINE_EXCEEDED": - case 3: - message.failureCause = 3; - break; - case "CLOUD_BUILD_REQUEST_FAILED": - case 4: - message.failureCause = 4; - break; + var message = new $root.google.cloud.deploy.v1.AdvanceRolloutOperation(); + if (object.sourcePhase != null) + message.sourcePhase = String(object.sourcePhase); + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.AdvanceRolloutOperation.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); } - if (object.failureMessage != null) - message.failureMessage = String(object.failureMessage); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.destinationPhase != null) + message.destinationPhase = String(object.destinationPhase); return message; }; /** - * Creates a plain object from a PostdeployJobRun message. Also converts values to other types if specified. + * Creates a plain object from an AdvanceRolloutOperation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static - * @param {google.cloud.deploy.v1.PostdeployJobRun} message PostdeployJobRun + * @param {google.cloud.deploy.v1.AdvanceRolloutOperation} message AdvanceRolloutOperation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostdeployJobRun.toObject = function toObject(message, options) { + AdvanceRolloutOperation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.build = ""; - object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; - object.failureMessage = ""; + object.wait = null; + object.rollout = ""; + object.destinationPhase = ""; + object.sourcePhase = ""; } - if (message.build != null && message.hasOwnProperty("build")) - object.build = message.build; - if (message.failureCause != null && message.hasOwnProperty("failureCause")) - object.failureCause = options.enums === String ? $root.google.cloud.deploy.v1.PostdeployJobRun.FailureCause[message.failureCause] === undefined ? message.failureCause : $root.google.cloud.deploy.v1.PostdeployJobRun.FailureCause[message.failureCause] : message.failureCause; - if (message.failureMessage != null && message.hasOwnProperty("failureMessage")) - object.failureMessage = message.failureMessage; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + object.destinationPhase = message.destinationPhase; + if (message.sourcePhase != null && message.hasOwnProperty("sourcePhase")) + object.sourcePhase = message.sourcePhase; return object; }; /** - * Converts this PostdeployJobRun to JSON. + * Converts this AdvanceRolloutOperation to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @instance * @returns {Object.} JSON object */ - PostdeployJobRun.prototype.toJSON = function toJSON() { + AdvanceRolloutOperation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostdeployJobRun + * Gets the default type url for AdvanceRolloutOperation * @function getTypeUrl - * @memberof google.cloud.deploy.v1.PostdeployJobRun + * @memberof google.cloud.deploy.v1.AdvanceRolloutOperation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostdeployJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvanceRolloutOperation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.PostdeployJobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceRolloutOperation"; }; - /** - * FailureCause enum. - * @name google.cloud.deploy.v1.PostdeployJobRun.FailureCause - * @enum {number} - * @property {number} FAILURE_CAUSE_UNSPECIFIED=0 FAILURE_CAUSE_UNSPECIFIED value - * @property {number} CLOUD_BUILD_UNAVAILABLE=1 CLOUD_BUILD_UNAVAILABLE value - * @property {number} EXECUTION_FAILED=2 EXECUTION_FAILED value - * @property {number} DEADLINE_EXCEEDED=3 DEADLINE_EXCEEDED value - * @property {number} CLOUD_BUILD_REQUEST_FAILED=4 CLOUD_BUILD_REQUEST_FAILED value - */ - PostdeployJobRun.FailureCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_BUILD_UNAVAILABLE"] = 1; - values[valuesById[2] = "EXECUTION_FAILED"] = 2; - values[valuesById[3] = "DEADLINE_EXCEEDED"] = 3; - values[valuesById[4] = "CLOUD_BUILD_REQUEST_FAILED"] = 4; - return values; - })(); - - return PostdeployJobRun; + return AdvanceRolloutOperation; })(); - v1.CreateChildRolloutJobRun = (function() { + v1.RepairRolloutOperation = (function() { /** - * Properties of a CreateChildRolloutJobRun. + * Properties of a RepairRolloutOperation. * @memberof google.cloud.deploy.v1 - * @interface ICreateChildRolloutJobRun - * @property {string|null} [rollout] CreateChildRolloutJobRun rollout - * @property {string|null} [rolloutPhaseId] CreateChildRolloutJobRun rolloutPhaseId + * @interface IRepairRolloutOperation + * @property {string|null} [rollout] RepairRolloutOperation rollout + * @property {number|Long|null} [currentRepairModeIndex] RepairRolloutOperation currentRepairModeIndex + * @property {Array.|null} [repairPhases] RepairRolloutOperation repairPhases */ /** - * Constructs a new CreateChildRolloutJobRun. + * Constructs a new RepairRolloutOperation. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a CreateChildRolloutJobRun. - * @implements ICreateChildRolloutJobRun + * @classdesc Represents a RepairRolloutOperation. + * @implements IRepairRolloutOperation * @constructor - * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRepairRolloutOperation=} [properties] Properties to set */ - function CreateChildRolloutJobRun(properties) { + function RepairRolloutOperation(properties) { + this.repairPhases = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27614,80 +38432,91 @@ } /** - * CreateChildRolloutJobRun rollout. + * RepairRolloutOperation rollout. * @member {string} rollout - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @instance */ - CreateChildRolloutJobRun.prototype.rollout = ""; + RepairRolloutOperation.prototype.rollout = ""; /** - * CreateChildRolloutJobRun rolloutPhaseId. - * @member {string} rolloutPhaseId - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * RepairRolloutOperation currentRepairModeIndex. + * @member {number|Long} currentRepairModeIndex + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @instance */ - CreateChildRolloutJobRun.prototype.rolloutPhaseId = ""; + RepairRolloutOperation.prototype.currentRepairModeIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new CreateChildRolloutJobRun instance using the specified properties. + * RepairRolloutOperation repairPhases. + * @member {Array.} repairPhases + * @memberof google.cloud.deploy.v1.RepairRolloutOperation + * @instance + */ + RepairRolloutOperation.prototype.repairPhases = $util.emptyArray; + + /** + * Creates a new RepairRolloutOperation instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static - * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun instance + * @param {google.cloud.deploy.v1.IRepairRolloutOperation=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RepairRolloutOperation} RepairRolloutOperation instance */ - CreateChildRolloutJobRun.create = function create(properties) { - return new CreateChildRolloutJobRun(properties); + RepairRolloutOperation.create = function create(properties) { + return new RepairRolloutOperation(properties); }; /** - * Encodes the specified CreateChildRolloutJobRun message. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJobRun.verify|verify} messages. + * Encodes the specified RepairRolloutOperation message. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutOperation.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static - * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun} message CreateChildRolloutJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairRolloutOperation} message RepairRolloutOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChildRolloutJobRun.encode = function encode(message, writer) { + RepairRolloutOperation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); - if (message.rolloutPhaseId != null && Object.hasOwnProperty.call(message, "rolloutPhaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutPhaseId); + if (message.currentRepairModeIndex != null && Object.hasOwnProperty.call(message, "currentRepairModeIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.currentRepairModeIndex); + if (message.repairPhases != null && message.repairPhases.length) + for (var i = 0; i < message.repairPhases.length; ++i) + $root.google.cloud.deploy.v1.RepairPhase.encode(message.repairPhases[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateChildRolloutJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CreateChildRolloutJobRun.verify|verify} messages. + * Encodes the specified RepairRolloutOperation message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairRolloutOperation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static - * @param {google.cloud.deploy.v1.ICreateChildRolloutJobRun} message CreateChildRolloutJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairRolloutOperation} message RepairRolloutOperation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChildRolloutJobRun.encodeDelimited = function encodeDelimited(message, writer) { + RepairRolloutOperation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateChildRolloutJobRun message from the specified reader or buffer. + * Decodes a RepairRolloutOperation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun + * @returns {google.cloud.deploy.v1.RepairRolloutOperation} RepairRolloutOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChildRolloutJobRun.decode = function decode(reader, length) { + RepairRolloutOperation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CreateChildRolloutJobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RepairRolloutOperation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -27696,7 +38525,13 @@ break; } case 2: { - message.rolloutPhaseId = reader.string(); + message.currentRepairModeIndex = reader.int64(); + break; + } + case 3: { + if (!(message.repairPhases && message.repairPhases.length)) + message.repairPhases = []; + message.repairPhases.push($root.google.cloud.deploy.v1.RepairPhase.decode(reader, reader.uint32())); break; } default: @@ -27708,132 +38543,172 @@ }; /** - * Decodes a CreateChildRolloutJobRun message from the specified reader or buffer, length delimited. + * Decodes a RepairRolloutOperation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun + * @returns {google.cloud.deploy.v1.RepairRolloutOperation} RepairRolloutOperation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChildRolloutJobRun.decodeDelimited = function decodeDelimited(reader) { + RepairRolloutOperation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateChildRolloutJobRun message. + * Verifies a RepairRolloutOperation message. * @function verify - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateChildRolloutJobRun.verify = function verify(message) { + RepairRolloutOperation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.rollout != null && message.hasOwnProperty("rollout")) if (!$util.isString(message.rollout)) return "rollout: string expected"; - if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) - if (!$util.isString(message.rolloutPhaseId)) - return "rolloutPhaseId: string expected"; + if (message.currentRepairModeIndex != null && message.hasOwnProperty("currentRepairModeIndex")) + if (!$util.isInteger(message.currentRepairModeIndex) && !(message.currentRepairModeIndex && $util.isInteger(message.currentRepairModeIndex.low) && $util.isInteger(message.currentRepairModeIndex.high))) + return "currentRepairModeIndex: integer|Long expected"; + if (message.repairPhases != null && message.hasOwnProperty("repairPhases")) { + if (!Array.isArray(message.repairPhases)) + return "repairPhases: array expected"; + for (var i = 0; i < message.repairPhases.length; ++i) { + var error = $root.google.cloud.deploy.v1.RepairPhase.verify(message.repairPhases[i]); + if (error) + return "repairPhases." + error; + } + } return null; }; /** - * Creates a CreateChildRolloutJobRun message from a plain object. Also converts values to their respective internal types. + * Creates a RepairRolloutOperation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.CreateChildRolloutJobRun} CreateChildRolloutJobRun + * @returns {google.cloud.deploy.v1.RepairRolloutOperation} RepairRolloutOperation */ - CreateChildRolloutJobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.CreateChildRolloutJobRun) + RepairRolloutOperation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RepairRolloutOperation) return object; - var message = new $root.google.cloud.deploy.v1.CreateChildRolloutJobRun(); + var message = new $root.google.cloud.deploy.v1.RepairRolloutOperation(); if (object.rollout != null) message.rollout = String(object.rollout); - if (object.rolloutPhaseId != null) - message.rolloutPhaseId = String(object.rolloutPhaseId); + if (object.currentRepairModeIndex != null) + if ($util.Long) + (message.currentRepairModeIndex = $util.Long.fromValue(object.currentRepairModeIndex)).unsigned = false; + else if (typeof object.currentRepairModeIndex === "string") + message.currentRepairModeIndex = parseInt(object.currentRepairModeIndex, 10); + else if (typeof object.currentRepairModeIndex === "number") + message.currentRepairModeIndex = object.currentRepairModeIndex; + else if (typeof object.currentRepairModeIndex === "object") + message.currentRepairModeIndex = new $util.LongBits(object.currentRepairModeIndex.low >>> 0, object.currentRepairModeIndex.high >>> 0).toNumber(); + if (object.repairPhases) { + if (!Array.isArray(object.repairPhases)) + throw TypeError(".google.cloud.deploy.v1.RepairRolloutOperation.repairPhases: array expected"); + message.repairPhases = []; + for (var i = 0; i < object.repairPhases.length; ++i) { + if (typeof object.repairPhases[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairRolloutOperation.repairPhases: object expected"); + message.repairPhases[i] = $root.google.cloud.deploy.v1.RepairPhase.fromObject(object.repairPhases[i]); + } + } return message; }; /** - * Creates a plain object from a CreateChildRolloutJobRun message. Also converts values to other types if specified. + * Creates a plain object from a RepairRolloutOperation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static - * @param {google.cloud.deploy.v1.CreateChildRolloutJobRun} message CreateChildRolloutJobRun + * @param {google.cloud.deploy.v1.RepairRolloutOperation} message RepairRolloutOperation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateChildRolloutJobRun.toObject = function toObject(message, options) { + RepairRolloutOperation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.repairPhases = []; if (options.defaults) { object.rollout = ""; - object.rolloutPhaseId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.currentRepairModeIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.currentRepairModeIndex = options.longs === String ? "0" : 0; } if (message.rollout != null && message.hasOwnProperty("rollout")) object.rollout = message.rollout; - if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) - object.rolloutPhaseId = message.rolloutPhaseId; + if (message.currentRepairModeIndex != null && message.hasOwnProperty("currentRepairModeIndex")) + if (typeof message.currentRepairModeIndex === "number") + object.currentRepairModeIndex = options.longs === String ? String(message.currentRepairModeIndex) : message.currentRepairModeIndex; + else + object.currentRepairModeIndex = options.longs === String ? $util.Long.prototype.toString.call(message.currentRepairModeIndex) : options.longs === Number ? new $util.LongBits(message.currentRepairModeIndex.low >>> 0, message.currentRepairModeIndex.high >>> 0).toNumber() : message.currentRepairModeIndex; + if (message.repairPhases && message.repairPhases.length) { + object.repairPhases = []; + for (var j = 0; j < message.repairPhases.length; ++j) + object.repairPhases[j] = $root.google.cloud.deploy.v1.RepairPhase.toObject(message.repairPhases[j], options); + } return object; }; /** - * Converts this CreateChildRolloutJobRun to JSON. + * Converts this RepairRolloutOperation to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @instance * @returns {Object.} JSON object */ - CreateChildRolloutJobRun.prototype.toJSON = function toJSON() { + RepairRolloutOperation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateChildRolloutJobRun + * Gets the default type url for RepairRolloutOperation * @function getTypeUrl - * @memberof google.cloud.deploy.v1.CreateChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairRolloutOperation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateChildRolloutJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RepairRolloutOperation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.CreateChildRolloutJobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RepairRolloutOperation"; }; - return CreateChildRolloutJobRun; + return RepairRolloutOperation; })(); - v1.AdvanceChildRolloutJobRun = (function() { + v1.RepairPhase = (function() { /** - * Properties of an AdvanceChildRolloutJobRun. + * Properties of a RepairPhase. * @memberof google.cloud.deploy.v1 - * @interface IAdvanceChildRolloutJobRun - * @property {string|null} [rollout] AdvanceChildRolloutJobRun rollout - * @property {string|null} [rolloutPhaseId] AdvanceChildRolloutJobRun rolloutPhaseId + * @interface IRepairPhase + * @property {google.cloud.deploy.v1.IRetryPhase|null} [retry] RepairPhase retry + * @property {google.cloud.deploy.v1.IRollbackAttempt|null} [rollback] RepairPhase rollback */ /** - * Constructs a new AdvanceChildRolloutJobRun. + * Constructs a new RepairPhase. * @memberof google.cloud.deploy.v1 - * @classdesc Represents an AdvanceChildRolloutJobRun. - * @implements IAdvanceChildRolloutJobRun + * @classdesc Represents a RepairPhase. + * @implements IRepairPhase * @constructor - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRepairPhase=} [properties] Properties to set */ - function AdvanceChildRolloutJobRun(properties) { + function RepairPhase(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27841,89 +38716,103 @@ } /** - * AdvanceChildRolloutJobRun rollout. - * @member {string} rollout - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * RepairPhase retry. + * @member {google.cloud.deploy.v1.IRetryPhase|null|undefined} retry + * @memberof google.cloud.deploy.v1.RepairPhase * @instance */ - AdvanceChildRolloutJobRun.prototype.rollout = ""; + RepairPhase.prototype.retry = null; /** - * AdvanceChildRolloutJobRun rolloutPhaseId. - * @member {string} rolloutPhaseId - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * RepairPhase rollback. + * @member {google.cloud.deploy.v1.IRollbackAttempt|null|undefined} rollback + * @memberof google.cloud.deploy.v1.RepairPhase * @instance */ - AdvanceChildRolloutJobRun.prototype.rolloutPhaseId = ""; + RepairPhase.prototype.rollback = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new AdvanceChildRolloutJobRun instance using the specified properties. + * RepairPhase repairPhase. + * @member {"retry"|"rollback"|undefined} repairPhase + * @memberof google.cloud.deploy.v1.RepairPhase + * @instance + */ + Object.defineProperty(RepairPhase.prototype, "repairPhase", { + get: $util.oneOfGetter($oneOfFields = ["retry", "rollback"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepairPhase instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun instance + * @param {google.cloud.deploy.v1.IRepairPhase=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RepairPhase} RepairPhase instance */ - AdvanceChildRolloutJobRun.create = function create(properties) { - return new AdvanceChildRolloutJobRun(properties); + RepairPhase.create = function create(properties) { + return new RepairPhase(properties); }; /** - * Encodes the specified AdvanceChildRolloutJobRun message. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJobRun.verify|verify} messages. + * Encodes the specified RepairPhase message. Does not implicitly {@link google.cloud.deploy.v1.RepairPhase.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun} message AdvanceChildRolloutJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairPhase} message RepairPhase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceChildRolloutJobRun.encode = function encode(message, writer) { + RepairPhase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rollout); - if (message.rolloutPhaseId != null && Object.hasOwnProperty.call(message, "rolloutPhaseId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutPhaseId); + if (message.retry != null && Object.hasOwnProperty.call(message, "retry")) + $root.google.cloud.deploy.v1.RetryPhase.encode(message.retry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rollback != null && Object.hasOwnProperty.call(message, "rollback")) + $root.google.cloud.deploy.v1.RollbackAttempt.encode(message.rollback, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AdvanceChildRolloutJobRun message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.AdvanceChildRolloutJobRun.verify|verify} messages. + * Encodes the specified RepairPhase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RepairPhase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static - * @param {google.cloud.deploy.v1.IAdvanceChildRolloutJobRun} message AdvanceChildRolloutJobRun message or plain object to encode + * @param {google.cloud.deploy.v1.IRepairPhase} message RepairPhase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvanceChildRolloutJobRun.encodeDelimited = function encodeDelimited(message, writer) { + RepairPhase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdvanceChildRolloutJobRun message from the specified reader or buffer. + * Decodes a RepairPhase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun + * @returns {google.cloud.deploy.v1.RepairPhase} RepairPhase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceChildRolloutJobRun.decode = function decode(reader, length) { + RepairPhase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RepairPhase(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rollout = reader.string(); + message.retry = $root.google.cloud.deploy.v1.RetryPhase.decode(reader, reader.uint32()); break; } case 2: { - message.rolloutPhaseId = reader.string(); + message.rollback = $root.google.cloud.deploy.v1.RollbackAttempt.decode(reader, reader.uint32()); break; } default: @@ -27935,135 +38824,157 @@ }; /** - * Decodes an AdvanceChildRolloutJobRun message from the specified reader or buffer, length delimited. + * Decodes a RepairPhase message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun + * @returns {google.cloud.deploy.v1.RepairPhase} RepairPhase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvanceChildRolloutJobRun.decodeDelimited = function decodeDelimited(reader) { + RepairPhase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdvanceChildRolloutJobRun message. + * Verifies a RepairPhase message. * @function verify - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdvanceChildRolloutJobRun.verify = function verify(message) { + RepairPhase.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rollout != null && message.hasOwnProperty("rollout")) - if (!$util.isString(message.rollout)) - return "rollout: string expected"; - if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) - if (!$util.isString(message.rolloutPhaseId)) - return "rolloutPhaseId: string expected"; + var properties = {}; + if (message.retry != null && message.hasOwnProperty("retry")) { + properties.repairPhase = 1; + { + var error = $root.google.cloud.deploy.v1.RetryPhase.verify(message.retry); + if (error) + return "retry." + error; + } + } + if (message.rollback != null && message.hasOwnProperty("rollback")) { + if (properties.repairPhase === 1) + return "repairPhase: multiple values"; + properties.repairPhase = 1; + { + var error = $root.google.cloud.deploy.v1.RollbackAttempt.verify(message.rollback); + if (error) + return "rollback." + error; + } + } return null; }; /** - * Creates an AdvanceChildRolloutJobRun message from a plain object. Also converts values to their respective internal types. + * Creates a RepairPhase message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} AdvanceChildRolloutJobRun + * @returns {google.cloud.deploy.v1.RepairPhase} RepairPhase */ - AdvanceChildRolloutJobRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun) + RepairPhase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RepairPhase) return object; - var message = new $root.google.cloud.deploy.v1.AdvanceChildRolloutJobRun(); - if (object.rollout != null) - message.rollout = String(object.rollout); - if (object.rolloutPhaseId != null) - message.rolloutPhaseId = String(object.rolloutPhaseId); + var message = new $root.google.cloud.deploy.v1.RepairPhase(); + if (object.retry != null) { + if (typeof object.retry !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairPhase.retry: object expected"); + message.retry = $root.google.cloud.deploy.v1.RetryPhase.fromObject(object.retry); + } + if (object.rollback != null) { + if (typeof object.rollback !== "object") + throw TypeError(".google.cloud.deploy.v1.RepairPhase.rollback: object expected"); + message.rollback = $root.google.cloud.deploy.v1.RollbackAttempt.fromObject(object.rollback); + } return message; }; /** - * Creates a plain object from an AdvanceChildRolloutJobRun message. Also converts values to other types if specified. + * Creates a plain object from a RepairPhase message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static - * @param {google.cloud.deploy.v1.AdvanceChildRolloutJobRun} message AdvanceChildRolloutJobRun + * @param {google.cloud.deploy.v1.RepairPhase} message RepairPhase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdvanceChildRolloutJobRun.toObject = function toObject(message, options) { + RepairPhase.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.rollout = ""; - object.rolloutPhaseId = ""; + if (message.retry != null && message.hasOwnProperty("retry")) { + object.retry = $root.google.cloud.deploy.v1.RetryPhase.toObject(message.retry, options); + if (options.oneofs) + object.repairPhase = "retry"; + } + if (message.rollback != null && message.hasOwnProperty("rollback")) { + object.rollback = $root.google.cloud.deploy.v1.RollbackAttempt.toObject(message.rollback, options); + if (options.oneofs) + object.repairPhase = "rollback"; } - if (message.rollout != null && message.hasOwnProperty("rollout")) - object.rollout = message.rollout; - if (message.rolloutPhaseId != null && message.hasOwnProperty("rolloutPhaseId")) - object.rolloutPhaseId = message.rolloutPhaseId; return object; }; /** - * Converts this AdvanceChildRolloutJobRun to JSON. + * Converts this RepairPhase to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @instance * @returns {Object.} JSON object */ - AdvanceChildRolloutJobRun.prototype.toJSON = function toJSON() { + RepairPhase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdvanceChildRolloutJobRun + * Gets the default type url for RepairPhase * @function getTypeUrl - * @memberof google.cloud.deploy.v1.AdvanceChildRolloutJobRun + * @memberof google.cloud.deploy.v1.RepairPhase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdvanceChildRolloutJobRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RepairPhase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.AdvanceChildRolloutJobRun"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RepairPhase"; }; - return AdvanceChildRolloutJobRun; + return RepairPhase; })(); - v1.ListJobRunsRequest = (function() { + v1.RetryPhase = (function() { /** - * Properties of a ListJobRunsRequest. + * Properties of a RetryPhase. * @memberof google.cloud.deploy.v1 - * @interface IListJobRunsRequest - * @property {string|null} [parent] ListJobRunsRequest parent - * @property {number|null} [pageSize] ListJobRunsRequest pageSize - * @property {string|null} [pageToken] ListJobRunsRequest pageToken - * @property {string|null} [filter] ListJobRunsRequest filter - * @property {string|null} [orderBy] ListJobRunsRequest orderBy + * @interface IRetryPhase + * @property {number|Long|null} [totalAttempts] RetryPhase totalAttempts + * @property {google.cloud.deploy.v1.BackoffMode|null} [backoffMode] RetryPhase backoffMode + * @property {string|null} [phaseId] RetryPhase phaseId + * @property {string|null} [jobId] RetryPhase jobId + * @property {Array.|null} [attempts] RetryPhase attempts */ /** - * Constructs a new ListJobRunsRequest. + * Constructs a new RetryPhase. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListJobRunsRequest. - * @implements IListJobRunsRequest + * @classdesc Represents a RetryPhase. + * @implements IRetryPhase * @constructor - * @param {google.cloud.deploy.v1.IListJobRunsRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRetryPhase=} [properties] Properties to set */ - function ListJobRunsRequest(properties) { + function RetryPhase(properties) { + this.attempts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28071,131 +38982,134 @@ } /** - * ListJobRunsRequest parent. - * @member {string} parent - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * RetryPhase totalAttempts. + * @member {number|Long} totalAttempts + * @memberof google.cloud.deploy.v1.RetryPhase * @instance */ - ListJobRunsRequest.prototype.parent = ""; + RetryPhase.prototype.totalAttempts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ListJobRunsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * RetryPhase backoffMode. + * @member {google.cloud.deploy.v1.BackoffMode} backoffMode + * @memberof google.cloud.deploy.v1.RetryPhase * @instance */ - ListJobRunsRequest.prototype.pageSize = 0; + RetryPhase.prototype.backoffMode = 0; /** - * ListJobRunsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * RetryPhase phaseId. + * @member {string} phaseId + * @memberof google.cloud.deploy.v1.RetryPhase * @instance */ - ListJobRunsRequest.prototype.pageToken = ""; + RetryPhase.prototype.phaseId = ""; /** - * ListJobRunsRequest filter. - * @member {string} filter - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * RetryPhase jobId. + * @member {string} jobId + * @memberof google.cloud.deploy.v1.RetryPhase * @instance */ - ListJobRunsRequest.prototype.filter = ""; + RetryPhase.prototype.jobId = ""; /** - * ListJobRunsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * RetryPhase attempts. + * @member {Array.} attempts + * @memberof google.cloud.deploy.v1.RetryPhase * @instance */ - ListJobRunsRequest.prototype.orderBy = ""; + RetryPhase.prototype.attempts = $util.emptyArray; /** - * Creates a new ListJobRunsRequest instance using the specified properties. + * Creates a new RetryPhase instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static - * @param {google.cloud.deploy.v1.IListJobRunsRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest instance + * @param {google.cloud.deploy.v1.IRetryPhase=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RetryPhase} RetryPhase instance */ - ListJobRunsRequest.create = function create(properties) { - return new ListJobRunsRequest(properties); + RetryPhase.create = function create(properties) { + return new RetryPhase(properties); }; /** - * Encodes the specified ListJobRunsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. + * Encodes the specified RetryPhase message. Does not implicitly {@link google.cloud.deploy.v1.RetryPhase.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static - * @param {google.cloud.deploy.v1.IListJobRunsRequest} message ListJobRunsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRetryPhase} message RetryPhase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobRunsRequest.encode = function encode(message, writer) { + RetryPhase.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.totalAttempts != null && Object.hasOwnProperty.call(message, "totalAttempts")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.totalAttempts); + if (message.backoffMode != null && Object.hasOwnProperty.call(message, "backoffMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.backoffMode); + if (message.phaseId != null && Object.hasOwnProperty.call(message, "phaseId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.phaseId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); + if (message.attempts != null && message.attempts.length) + for (var i = 0; i < message.attempts.length; ++i) + $root.google.cloud.deploy.v1.RetryAttempt.encode(message.attempts[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListJobRunsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsRequest.verify|verify} messages. + * Encodes the specified RetryPhase message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryPhase.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static - * @param {google.cloud.deploy.v1.IListJobRunsRequest} message ListJobRunsRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRetryPhase} message RetryPhase message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { + RetryPhase.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobRunsRequest message from the specified reader or buffer. + * Decodes a RetryPhase message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest + * @returns {google.cloud.deploy.v1.RetryPhase} RetryPhase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobRunsRequest.decode = function decode(reader, length) { + RetryPhase.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListJobRunsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryPhase(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.totalAttempts = reader.int64(); break; } case 2: { - message.pageSize = reader.int32(); + message.backoffMode = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); + message.phaseId = reader.string(); break; } case 4: { - message.filter = reader.string(); + message.jobId = reader.string(); break; } case 5: { - message.orderBy = reader.string(); + if (!(message.attempts && message.attempts.length)) + message.attempts = []; + message.attempts.push($root.google.cloud.deploy.v1.RetryAttempt.decode(reader, reader.uint32())); break; } default: @@ -28207,159 +39121,214 @@ }; /** - * Decodes a ListJobRunsRequest message from the specified reader or buffer, length delimited. + * Decodes a RetryPhase message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest + * @returns {google.cloud.deploy.v1.RetryPhase} RetryPhase * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobRunsRequest.decodeDelimited = function decodeDelimited(reader) { + RetryPhase.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobRunsRequest message. + * Verifies a RetryPhase message. * @function verify - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobRunsRequest.verify = function verify(message) { + RetryPhase.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.totalAttempts != null && message.hasOwnProperty("totalAttempts")) + if (!$util.isInteger(message.totalAttempts) && !(message.totalAttempts && $util.isInteger(message.totalAttempts.low) && $util.isInteger(message.totalAttempts.high))) + return "totalAttempts: integer|Long expected"; + if (message.backoffMode != null && message.hasOwnProperty("backoffMode")) + switch (message.backoffMode) { + default: + return "backoffMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + if (!$util.isString(message.phaseId)) + return "phaseId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.attempts != null && message.hasOwnProperty("attempts")) { + if (!Array.isArray(message.attempts)) + return "attempts: array expected"; + for (var i = 0; i < message.attempts.length; ++i) { + var error = $root.google.cloud.deploy.v1.RetryAttempt.verify(message.attempts[i]); + if (error) + return "attempts." + error; + } + } return null; }; /** - * Creates a ListJobRunsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RetryPhase message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListJobRunsRequest} ListJobRunsRequest + * @returns {google.cloud.deploy.v1.RetryPhase} RetryPhase */ - ListJobRunsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListJobRunsRequest) + RetryPhase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RetryPhase) return object; - var message = new $root.google.cloud.deploy.v1.ListJobRunsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.deploy.v1.RetryPhase(); + if (object.totalAttempts != null) + if ($util.Long) + (message.totalAttempts = $util.Long.fromValue(object.totalAttempts)).unsigned = false; + else if (typeof object.totalAttempts === "string") + message.totalAttempts = parseInt(object.totalAttempts, 10); + else if (typeof object.totalAttempts === "number") + message.totalAttempts = object.totalAttempts; + else if (typeof object.totalAttempts === "object") + message.totalAttempts = new $util.LongBits(object.totalAttempts.low >>> 0, object.totalAttempts.high >>> 0).toNumber(); + switch (object.backoffMode) { + default: + if (typeof object.backoffMode === "number") { + message.backoffMode = object.backoffMode; + break; + } + break; + case "BACKOFF_MODE_UNSPECIFIED": + case 0: + message.backoffMode = 0; + break; + case "BACKOFF_MODE_LINEAR": + case 1: + message.backoffMode = 1; + break; + case "BACKOFF_MODE_EXPONENTIAL": + case 2: + message.backoffMode = 2; + break; + } + if (object.phaseId != null) + message.phaseId = String(object.phaseId); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.attempts) { + if (!Array.isArray(object.attempts)) + throw TypeError(".google.cloud.deploy.v1.RetryPhase.attempts: array expected"); + message.attempts = []; + for (var i = 0; i < object.attempts.length; ++i) { + if (typeof object.attempts[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.RetryPhase.attempts: object expected"); + message.attempts[i] = $root.google.cloud.deploy.v1.RetryAttempt.fromObject(object.attempts[i]); + } + } return message; }; /** - * Creates a plain object from a ListJobRunsRequest message. Also converts values to other types if specified. + * Creates a plain object from a RetryPhase message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static - * @param {google.cloud.deploy.v1.ListJobRunsRequest} message ListJobRunsRequest + * @param {google.cloud.deploy.v1.RetryPhase} message RetryPhase * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobRunsRequest.toObject = function toObject(message, options) { + RetryPhase.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.attempts = []; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalAttempts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalAttempts = options.longs === String ? "0" : 0; + object.backoffMode = options.enums === String ? "BACKOFF_MODE_UNSPECIFIED" : 0; + object.phaseId = ""; + object.jobId = ""; + } + if (message.totalAttempts != null && message.hasOwnProperty("totalAttempts")) + if (typeof message.totalAttempts === "number") + object.totalAttempts = options.longs === String ? String(message.totalAttempts) : message.totalAttempts; + else + object.totalAttempts = options.longs === String ? $util.Long.prototype.toString.call(message.totalAttempts) : options.longs === Number ? new $util.LongBits(message.totalAttempts.low >>> 0, message.totalAttempts.high >>> 0).toNumber() : message.totalAttempts; + if (message.backoffMode != null && message.hasOwnProperty("backoffMode")) + object.backoffMode = options.enums === String ? $root.google.cloud.deploy.v1.BackoffMode[message.backoffMode] === undefined ? message.backoffMode : $root.google.cloud.deploy.v1.BackoffMode[message.backoffMode] : message.backoffMode; + if (message.phaseId != null && message.hasOwnProperty("phaseId")) + object.phaseId = message.phaseId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.attempts && message.attempts.length) { + object.attempts = []; + for (var j = 0; j < message.attempts.length; ++j) + object.attempts[j] = $root.google.cloud.deploy.v1.RetryAttempt.toObject(message.attempts[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; return object; }; /** - * Converts this ListJobRunsRequest to JSON. + * Converts this RetryPhase to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @instance * @returns {Object.} JSON object */ - ListJobRunsRequest.prototype.toJSON = function toJSON() { + RetryPhase.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListJobRunsRequest + * Gets the default type url for RetryPhase * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListJobRunsRequest + * @memberof google.cloud.deploy.v1.RetryPhase * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListJobRunsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RetryPhase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListJobRunsRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RetryPhase"; }; - return ListJobRunsRequest; + return RetryPhase; })(); - v1.ListJobRunsResponse = (function() { + v1.RetryAttempt = (function() { /** - * Properties of a ListJobRunsResponse. + * Properties of a RetryAttempt. * @memberof google.cloud.deploy.v1 - * @interface IListJobRunsResponse - * @property {Array.|null} [jobRuns] ListJobRunsResponse jobRuns - * @property {string|null} [nextPageToken] ListJobRunsResponse nextPageToken - * @property {Array.|null} [unreachable] ListJobRunsResponse unreachable + * @interface IRetryAttempt + * @property {number|Long|null} [attempt] RetryAttempt attempt + * @property {google.protobuf.IDuration|null} [wait] RetryAttempt wait + * @property {google.cloud.deploy.v1.RepairState|null} [state] RetryAttempt state + * @property {string|null} [stateDesc] RetryAttempt stateDesc */ /** - * Constructs a new ListJobRunsResponse. + * Constructs a new RetryAttempt. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a ListJobRunsResponse. - * @implements IListJobRunsResponse + * @classdesc Represents a RetryAttempt. + * @implements IRetryAttempt * @constructor - * @param {google.cloud.deploy.v1.IListJobRunsResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRetryAttempt=} [properties] Properties to set */ - function ListJobRunsResponse(properties) { - this.jobRuns = []; - this.unreachable = []; + function RetryAttempt(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28367,109 +39336,117 @@ } /** - * ListJobRunsResponse jobRuns. - * @member {Array.} jobRuns - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * RetryAttempt attempt. + * @member {number|Long} attempt + * @memberof google.cloud.deploy.v1.RetryAttempt * @instance */ - ListJobRunsResponse.prototype.jobRuns = $util.emptyArray; + RetryAttempt.prototype.attempt = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RetryAttempt wait. + * @member {google.protobuf.IDuration|null|undefined} wait + * @memberof google.cloud.deploy.v1.RetryAttempt + * @instance + */ + RetryAttempt.prototype.wait = null; /** - * ListJobRunsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * RetryAttempt state. + * @member {google.cloud.deploy.v1.RepairState} state + * @memberof google.cloud.deploy.v1.RetryAttempt * @instance */ - ListJobRunsResponse.prototype.nextPageToken = ""; + RetryAttempt.prototype.state = 0; /** - * ListJobRunsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * RetryAttempt stateDesc. + * @member {string} stateDesc + * @memberof google.cloud.deploy.v1.RetryAttempt * @instance */ - ListJobRunsResponse.prototype.unreachable = $util.emptyArray; + RetryAttempt.prototype.stateDesc = ""; /** - * Creates a new ListJobRunsResponse instance using the specified properties. + * Creates a new RetryAttempt instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static - * @param {google.cloud.deploy.v1.IListJobRunsResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse instance + * @param {google.cloud.deploy.v1.IRetryAttempt=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RetryAttempt} RetryAttempt instance */ - ListJobRunsResponse.create = function create(properties) { - return new ListJobRunsResponse(properties); + RetryAttempt.create = function create(properties) { + return new RetryAttempt(properties); }; /** - * Encodes the specified ListJobRunsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. + * Encodes the specified RetryAttempt message. Does not implicitly {@link google.cloud.deploy.v1.RetryAttempt.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static - * @param {google.cloud.deploy.v1.IListJobRunsResponse} message ListJobRunsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IRetryAttempt} message RetryAttempt message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobRunsResponse.encode = function encode(message, writer) { + RetryAttempt.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.jobRuns != null && message.jobRuns.length) - for (var i = 0; i < message.jobRuns.length; ++i) - $root.google.cloud.deploy.v1.JobRun.encode(message.jobRuns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.attempt != null && Object.hasOwnProperty.call(message, "attempt")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.attempt); + if (message.wait != null && Object.hasOwnProperty.call(message, "wait")) + $root.google.protobuf.Duration.encode(message.wait, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.stateDesc != null && Object.hasOwnProperty.call(message, "stateDesc")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.stateDesc); return writer; }; /** - * Encodes the specified ListJobRunsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListJobRunsResponse.verify|verify} messages. + * Encodes the specified RetryAttempt message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RetryAttempt.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static - * @param {google.cloud.deploy.v1.IListJobRunsResponse} message ListJobRunsResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IRetryAttempt} message RetryAttempt message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { + RetryAttempt.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobRunsResponse message from the specified reader or buffer. + * Decodes a RetryAttempt message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse + * @returns {google.cloud.deploy.v1.RetryAttempt} RetryAttempt * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobRunsResponse.decode = function decode(reader, length) { + RetryAttempt.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListJobRunsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RetryAttempt(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.jobRuns && message.jobRuns.length)) - message.jobRuns = []; - message.jobRuns.push($root.google.cloud.deploy.v1.JobRun.decode(reader, reader.uint32())); + message.attempt = reader.int64(); break; } case 2: { - message.nextPageToken = reader.string(); + message.wait = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.stateDesc = reader.string(); break; } default: @@ -28481,169 +39458,213 @@ }; /** - * Decodes a ListJobRunsResponse message from the specified reader or buffer, length delimited. + * Decodes a RetryAttempt message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse + * @returns {google.cloud.deploy.v1.RetryAttempt} RetryAttempt * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobRunsResponse.decodeDelimited = function decodeDelimited(reader) { + RetryAttempt.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobRunsResponse message. + * Verifies a RetryAttempt message. * @function verify - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobRunsResponse.verify = function verify(message) { + RetryAttempt.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jobRuns != null && message.hasOwnProperty("jobRuns")) { - if (!Array.isArray(message.jobRuns)) - return "jobRuns: array expected"; - for (var i = 0; i < message.jobRuns.length; ++i) { - var error = $root.google.cloud.deploy.v1.JobRun.verify(message.jobRuns[i]); - if (error) - return "jobRuns." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.attempt != null && message.hasOwnProperty("attempt")) + if (!$util.isInteger(message.attempt) && !(message.attempt && $util.isInteger(message.attempt.low) && $util.isInteger(message.attempt.high))) + return "attempt: integer|Long expected"; + if (message.wait != null && message.hasOwnProperty("wait")) { + var error = $root.google.protobuf.Duration.verify(message.wait); + if (error) + return "wait." + error; } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.stateDesc != null && message.hasOwnProperty("stateDesc")) + if (!$util.isString(message.stateDesc)) + return "stateDesc: string expected"; return null; }; /** - * Creates a ListJobRunsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RetryAttempt message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.ListJobRunsResponse} ListJobRunsResponse + * @returns {google.cloud.deploy.v1.RetryAttempt} RetryAttempt */ - ListJobRunsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.ListJobRunsResponse) + RetryAttempt.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RetryAttempt) return object; - var message = new $root.google.cloud.deploy.v1.ListJobRunsResponse(); - if (object.jobRuns) { - if (!Array.isArray(object.jobRuns)) - throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.jobRuns: array expected"); - message.jobRuns = []; - for (var i = 0; i < object.jobRuns.length; ++i) { - if (typeof object.jobRuns[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.jobRuns: object expected"); - message.jobRuns[i] = $root.google.cloud.deploy.v1.JobRun.fromObject(object.jobRuns[i]); - } + var message = new $root.google.cloud.deploy.v1.RetryAttempt(); + if (object.attempt != null) + if ($util.Long) + (message.attempt = $util.Long.fromValue(object.attempt)).unsigned = false; + else if (typeof object.attempt === "string") + message.attempt = parseInt(object.attempt, 10); + else if (typeof object.attempt === "number") + message.attempt = object.attempt; + else if (typeof object.attempt === "object") + message.attempt = new $util.LongBits(object.attempt.low >>> 0, object.attempt.high >>> 0).toNumber(); + if (object.wait != null) { + if (typeof object.wait !== "object") + throw TypeError(".google.cloud.deploy.v1.RetryAttempt.wait: object expected"); + message.wait = $root.google.protobuf.Duration.fromObject(object.wait); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.deploy.v1.ListJobRunsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "REPAIR_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "REPAIR_STATE_SUCCEEDED": + case 1: + message.state = 1; + break; + case "REPAIR_STATE_CANCELLED": + case 2: + message.state = 2; + break; + case "REPAIR_STATE_FAILED": + case 3: + message.state = 3; + break; + case "REPAIR_STATE_IN_PROGRESS": + case 4: + message.state = 4; + break; + case "REPAIR_STATE_PENDING": + case 5: + message.state = 5; + break; + case "REPAIR_STATE_SKIPPED": + case 6: + message.state = 6; + break; } + if (object.stateDesc != null) + message.stateDesc = String(object.stateDesc); return message; }; /** - * Creates a plain object from a ListJobRunsResponse message. Also converts values to other types if specified. + * Creates a plain object from a RetryAttempt message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static - * @param {google.cloud.deploy.v1.ListJobRunsResponse} message ListJobRunsResponse + * @param {google.cloud.deploy.v1.RetryAttempt} message RetryAttempt * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobRunsResponse.toObject = function toObject(message, options) { + RetryAttempt.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.jobRuns = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.jobRuns && message.jobRuns.length) { - object.jobRuns = []; - for (var j = 0; j < message.jobRuns.length; ++j) - object.jobRuns[j] = $root.google.cloud.deploy.v1.JobRun.toObject(message.jobRuns[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.attempt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.attempt = options.longs === String ? "0" : 0; + object.wait = null; + object.state = options.enums === String ? "REPAIR_STATE_UNSPECIFIED" : 0; + object.stateDesc = ""; + } + if (message.attempt != null && message.hasOwnProperty("attempt")) + if (typeof message.attempt === "number") + object.attempt = options.longs === String ? String(message.attempt) : message.attempt; + else + object.attempt = options.longs === String ? $util.Long.prototype.toString.call(message.attempt) : options.longs === Number ? new $util.LongBits(message.attempt.low >>> 0, message.attempt.high >>> 0).toNumber() : message.attempt; + if (message.wait != null && message.hasOwnProperty("wait")) + object.wait = $root.google.protobuf.Duration.toObject(message.wait, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.RepairState[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.RepairState[message.state] : message.state; + if (message.stateDesc != null && message.hasOwnProperty("stateDesc")) + object.stateDesc = message.stateDesc; return object; }; /** - * Converts this ListJobRunsResponse to JSON. + * Converts this RetryAttempt to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @instance * @returns {Object.} JSON object */ - ListJobRunsResponse.prototype.toJSON = function toJSON() { + RetryAttempt.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListJobRunsResponse + * Gets the default type url for RetryAttempt * @function getTypeUrl - * @memberof google.cloud.deploy.v1.ListJobRunsResponse + * @memberof google.cloud.deploy.v1.RetryAttempt * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListJobRunsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RetryAttempt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.ListJobRunsResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RetryAttempt"; }; - return ListJobRunsResponse; + return RetryAttempt; })(); - v1.GetJobRunRequest = (function() { + v1.RollbackAttempt = (function() { /** - * Properties of a GetJobRunRequest. + * Properties of a RollbackAttempt. * @memberof google.cloud.deploy.v1 - * @interface IGetJobRunRequest - * @property {string|null} [name] GetJobRunRequest name + * @interface IRollbackAttempt + * @property {string|null} [destinationPhase] RollbackAttempt destinationPhase + * @property {string|null} [rolloutId] RollbackAttempt rolloutId + * @property {google.cloud.deploy.v1.RepairState|null} [state] RollbackAttempt state + * @property {string|null} [stateDesc] RollbackAttempt stateDesc */ /** - * Constructs a new GetJobRunRequest. + * Constructs a new RollbackAttempt. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetJobRunRequest. - * @implements IGetJobRunRequest + * @classdesc Represents a RollbackAttempt. + * @implements IRollbackAttempt * @constructor - * @param {google.cloud.deploy.v1.IGetJobRunRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IRollbackAttempt=} [properties] Properties to set */ - function GetJobRunRequest(properties) { + function RollbackAttempt(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28651,75 +39672,117 @@ } /** - * GetJobRunRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * RollbackAttempt destinationPhase. + * @member {string} destinationPhase + * @memberof google.cloud.deploy.v1.RollbackAttempt * @instance */ - GetJobRunRequest.prototype.name = ""; + RollbackAttempt.prototype.destinationPhase = ""; /** - * Creates a new GetJobRunRequest instance using the specified properties. + * RollbackAttempt rolloutId. + * @member {string} rolloutId + * @memberof google.cloud.deploy.v1.RollbackAttempt + * @instance + */ + RollbackAttempt.prototype.rolloutId = ""; + + /** + * RollbackAttempt state. + * @member {google.cloud.deploy.v1.RepairState} state + * @memberof google.cloud.deploy.v1.RollbackAttempt + * @instance + */ + RollbackAttempt.prototype.state = 0; + + /** + * RollbackAttempt stateDesc. + * @member {string} stateDesc + * @memberof google.cloud.deploy.v1.RollbackAttempt + * @instance + */ + RollbackAttempt.prototype.stateDesc = ""; + + /** + * Creates a new RollbackAttempt instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static - * @param {google.cloud.deploy.v1.IGetJobRunRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest instance + * @param {google.cloud.deploy.v1.IRollbackAttempt=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RollbackAttempt} RollbackAttempt instance */ - GetJobRunRequest.create = function create(properties) { - return new GetJobRunRequest(properties); + RollbackAttempt.create = function create(properties) { + return new RollbackAttempt(properties); }; /** - * Encodes the specified GetJobRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. + * Encodes the specified RollbackAttempt message. Does not implicitly {@link google.cloud.deploy.v1.RollbackAttempt.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static - * @param {google.cloud.deploy.v1.IGetJobRunRequest} message GetJobRunRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRollbackAttempt} message RollbackAttempt message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobRunRequest.encode = function encode(message, writer) { + RollbackAttempt.encode = function encode(message, writer) { 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.destinationPhase != null && Object.hasOwnProperty.call(message, "destinationPhase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationPhase); + if (message.rolloutId != null && Object.hasOwnProperty.call(message, "rolloutId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rolloutId); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.stateDesc != null && Object.hasOwnProperty.call(message, "stateDesc")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stateDesc); return writer; }; /** - * Encodes the specified GetJobRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetJobRunRequest.verify|verify} messages. + * Encodes the specified RollbackAttempt message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RollbackAttempt.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static - * @param {google.cloud.deploy.v1.IGetJobRunRequest} message GetJobRunRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IRollbackAttempt} message RollbackAttempt message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetJobRunRequest.encodeDelimited = function encodeDelimited(message, writer) { + RollbackAttempt.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetJobRunRequest message from the specified reader or buffer. + * Decodes a RollbackAttempt message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest + * @returns {google.cloud.deploy.v1.RollbackAttempt} RollbackAttempt * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobRunRequest.decode = function decode(reader, length) { + RollbackAttempt.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetJobRunRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RollbackAttempt(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.destinationPhase = reader.string(); + break; + } + case 2: { + message.rolloutId = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.stateDesc = reader.string(); break; } default: @@ -28731,122 +39794,195 @@ }; /** - * Decodes a GetJobRunRequest message from the specified reader or buffer, length delimited. + * Decodes a RollbackAttempt message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest + * @returns {google.cloud.deploy.v1.RollbackAttempt} RollbackAttempt * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetJobRunRequest.decodeDelimited = function decodeDelimited(reader) { + RollbackAttempt.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetJobRunRequest message. + * Verifies a RollbackAttempt message. * @function verify - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetJobRunRequest.verify = function verify(message) { + RollbackAttempt.verify = function verify(message) { if (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.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + if (!$util.isString(message.destinationPhase)) + return "destinationPhase: string expected"; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + if (!$util.isString(message.rolloutId)) + return "rolloutId: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.stateDesc != null && message.hasOwnProperty("stateDesc")) + if (!$util.isString(message.stateDesc)) + return "stateDesc: string expected"; return null; }; /** - * Creates a GetJobRunRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackAttempt message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetJobRunRequest} GetJobRunRequest + * @returns {google.cloud.deploy.v1.RollbackAttempt} RollbackAttempt */ - GetJobRunRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetJobRunRequest) + RollbackAttempt.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RollbackAttempt) return object; - var message = new $root.google.cloud.deploy.v1.GetJobRunRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.RollbackAttempt(); + if (object.destinationPhase != null) + message.destinationPhase = String(object.destinationPhase); + if (object.rolloutId != null) + message.rolloutId = String(object.rolloutId); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "REPAIR_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "REPAIR_STATE_SUCCEEDED": + case 1: + message.state = 1; + break; + case "REPAIR_STATE_CANCELLED": + case 2: + message.state = 2; + break; + case "REPAIR_STATE_FAILED": + case 3: + message.state = 3; + break; + case "REPAIR_STATE_IN_PROGRESS": + case 4: + message.state = 4; + break; + case "REPAIR_STATE_PENDING": + case 5: + message.state = 5; + break; + case "REPAIR_STATE_SKIPPED": + case 6: + message.state = 6; + break; + } + if (object.stateDesc != null) + message.stateDesc = String(object.stateDesc); return message; }; /** - * Creates a plain object from a GetJobRunRequest message. Also converts values to other types if specified. + * Creates a plain object from a RollbackAttempt message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static - * @param {google.cloud.deploy.v1.GetJobRunRequest} message GetJobRunRequest + * @param {google.cloud.deploy.v1.RollbackAttempt} message RollbackAttempt * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetJobRunRequest.toObject = function toObject(message, options) { + RollbackAttempt.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.destinationPhase = ""; + object.rolloutId = ""; + object.state = options.enums === String ? "REPAIR_STATE_UNSPECIFIED" : 0; + object.stateDesc = ""; + } + if (message.destinationPhase != null && message.hasOwnProperty("destinationPhase")) + object.destinationPhase = message.destinationPhase; + if (message.rolloutId != null && message.hasOwnProperty("rolloutId")) + object.rolloutId = message.rolloutId; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.deploy.v1.RepairState[message.state] === undefined ? message.state : $root.google.cloud.deploy.v1.RepairState[message.state] : message.state; + if (message.stateDesc != null && message.hasOwnProperty("stateDesc")) + object.stateDesc = message.stateDesc; return object; }; /** - * Converts this GetJobRunRequest to JSON. + * Converts this RollbackAttempt to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @instance * @returns {Object.} JSON object */ - GetJobRunRequest.prototype.toJSON = function toJSON() { + RollbackAttempt.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetJobRunRequest + * Gets the default type url for RollbackAttempt * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetJobRunRequest + * @memberof google.cloud.deploy.v1.RollbackAttempt * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetJobRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RollbackAttempt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetJobRunRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.RollbackAttempt"; }; - return GetJobRunRequest; + return RollbackAttempt; })(); - v1.TerminateJobRunRequest = (function() { + v1.ListAutomationRunsRequest = (function() { /** - * Properties of a TerminateJobRunRequest. + * Properties of a ListAutomationRunsRequest. * @memberof google.cloud.deploy.v1 - * @interface ITerminateJobRunRequest - * @property {string|null} [name] TerminateJobRunRequest name + * @interface IListAutomationRunsRequest + * @property {string|null} [parent] ListAutomationRunsRequest parent + * @property {number|null} [pageSize] ListAutomationRunsRequest pageSize + * @property {string|null} [pageToken] ListAutomationRunsRequest pageToken + * @property {string|null} [filter] ListAutomationRunsRequest filter + * @property {string|null} [orderBy] ListAutomationRunsRequest orderBy */ /** - * Constructs a new TerminateJobRunRequest. + * Constructs a new ListAutomationRunsRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a TerminateJobRunRequest. - * @implements ITerminateJobRunRequest + * @classdesc Represents a ListAutomationRunsRequest. + * @implements IListAutomationRunsRequest * @constructor - * @param {google.cloud.deploy.v1.ITerminateJobRunRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListAutomationRunsRequest=} [properties] Properties to set */ - function TerminateJobRunRequest(properties) { + function ListAutomationRunsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28854,75 +39990,131 @@ } /** - * TerminateJobRunRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * ListAutomationRunsRequest parent. + * @member {string} parent + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @instance */ - TerminateJobRunRequest.prototype.name = ""; + ListAutomationRunsRequest.prototype.parent = ""; /** - * Creates a new TerminateJobRunRequest instance using the specified properties. + * ListAutomationRunsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest + * @instance + */ + ListAutomationRunsRequest.prototype.pageSize = 0; + + /** + * ListAutomationRunsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest + * @instance + */ + ListAutomationRunsRequest.prototype.pageToken = ""; + + /** + * ListAutomationRunsRequest filter. + * @member {string} filter + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest + * @instance + */ + ListAutomationRunsRequest.prototype.filter = ""; + + /** + * ListAutomationRunsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest + * @instance + */ + ListAutomationRunsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListAutomationRunsRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static - * @param {google.cloud.deploy.v1.ITerminateJobRunRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest instance + * @param {google.cloud.deploy.v1.IListAutomationRunsRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListAutomationRunsRequest} ListAutomationRunsRequest instance */ - TerminateJobRunRequest.create = function create(properties) { - return new TerminateJobRunRequest(properties); + ListAutomationRunsRequest.create = function create(properties) { + return new ListAutomationRunsRequest(properties); }; /** - * Encodes the specified TerminateJobRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunRequest.verify|verify} messages. + * Encodes the specified ListAutomationRunsRequest message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static - * @param {google.cloud.deploy.v1.ITerminateJobRunRequest} message TerminateJobRunRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationRunsRequest} message ListAutomationRunsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TerminateJobRunRequest.encode = function encode(message, writer) { + ListAutomationRunsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified TerminateJobRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunRequest.verify|verify} messages. + * Encodes the specified ListAutomationRunsRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static - * @param {google.cloud.deploy.v1.ITerminateJobRunRequest} message TerminateJobRunRequest message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationRunsRequest} message ListAutomationRunsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TerminateJobRunRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAutomationRunsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TerminateJobRunRequest message from the specified reader or buffer. + * Decodes a ListAutomationRunsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest + * @returns {google.cloud.deploy.v1.ListAutomationRunsRequest} ListAutomationRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TerminateJobRunRequest.decode = function decode(reader, length) { + ListAutomationRunsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TerminateJobRunRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListAutomationRunsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -28934,121 +40126,159 @@ }; /** - * Decodes a TerminateJobRunRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAutomationRunsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest + * @returns {google.cloud.deploy.v1.ListAutomationRunsRequest} ListAutomationRunsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TerminateJobRunRequest.decodeDelimited = function decodeDelimited(reader) { + ListAutomationRunsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TerminateJobRunRequest message. + * Verifies a ListAutomationRunsRequest message. * @function verify - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TerminateJobRunRequest.verify = function verify(message) { + ListAutomationRunsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a TerminateJobRunRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAutomationRunsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.TerminateJobRunRequest} TerminateJobRunRequest + * @returns {google.cloud.deploy.v1.ListAutomationRunsRequest} ListAutomationRunsRequest */ - TerminateJobRunRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.TerminateJobRunRequest) + ListAutomationRunsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListAutomationRunsRequest) return object; - var message = new $root.google.cloud.deploy.v1.TerminateJobRunRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.deploy.v1.ListAutomationRunsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a TerminateJobRunRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAutomationRunsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static - * @param {google.cloud.deploy.v1.TerminateJobRunRequest} message TerminateJobRunRequest + * @param {google.cloud.deploy.v1.ListAutomationRunsRequest} message ListAutomationRunsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TerminateJobRunRequest.toObject = function toObject(message, options) { + ListAutomationRunsRequest.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 = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this TerminateJobRunRequest to JSON. + * Converts this ListAutomationRunsRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @instance * @returns {Object.} JSON object */ - TerminateJobRunRequest.prototype.toJSON = function toJSON() { + ListAutomationRunsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TerminateJobRunRequest + * Gets the default type url for ListAutomationRunsRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.TerminateJobRunRequest + * @memberof google.cloud.deploy.v1.ListAutomationRunsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TerminateJobRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAutomationRunsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.TerminateJobRunRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListAutomationRunsRequest"; }; - return TerminateJobRunRequest; + return ListAutomationRunsRequest; })(); - v1.TerminateJobRunResponse = (function() { + v1.ListAutomationRunsResponse = (function() { /** - * Properties of a TerminateJobRunResponse. + * Properties of a ListAutomationRunsResponse. * @memberof google.cloud.deploy.v1 - * @interface ITerminateJobRunResponse + * @interface IListAutomationRunsResponse + * @property {Array.|null} [automationRuns] ListAutomationRunsResponse automationRuns + * @property {string|null} [nextPageToken] ListAutomationRunsResponse nextPageToken + * @property {Array.|null} [unreachable] ListAutomationRunsResponse unreachable */ /** - * Constructs a new TerminateJobRunResponse. + * Constructs a new ListAutomationRunsResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a TerminateJobRunResponse. - * @implements ITerminateJobRunResponse + * @classdesc Represents a ListAutomationRunsResponse. + * @implements IListAutomationRunsResponse * @constructor - * @param {google.cloud.deploy.v1.ITerminateJobRunResponse=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IListAutomationRunsResponse=} [properties] Properties to set */ - function TerminateJobRunResponse(properties) { + function ListAutomationRunsResponse(properties) { + this.automationRuns = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29056,63 +40286,111 @@ } /** - * Creates a new TerminateJobRunResponse instance using the specified properties. + * ListAutomationRunsResponse automationRuns. + * @member {Array.} automationRuns + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse + * @instance + */ + ListAutomationRunsResponse.prototype.automationRuns = $util.emptyArray; + + /** + * ListAutomationRunsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse + * @instance + */ + ListAutomationRunsResponse.prototype.nextPageToken = ""; + + /** + * ListAutomationRunsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse + * @instance + */ + ListAutomationRunsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListAutomationRunsResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static - * @param {google.cloud.deploy.v1.ITerminateJobRunResponse=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse instance + * @param {google.cloud.deploy.v1.IListAutomationRunsResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.ListAutomationRunsResponse} ListAutomationRunsResponse instance */ - TerminateJobRunResponse.create = function create(properties) { - return new TerminateJobRunResponse(properties); + ListAutomationRunsResponse.create = function create(properties) { + return new ListAutomationRunsResponse(properties); }; /** - * Encodes the specified TerminateJobRunResponse message. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunResponse.verify|verify} messages. + * Encodes the specified ListAutomationRunsResponse message. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static - * @param {google.cloud.deploy.v1.ITerminateJobRunResponse} message TerminateJobRunResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationRunsResponse} message ListAutomationRunsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TerminateJobRunResponse.encode = function encode(message, writer) { + ListAutomationRunsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.automationRuns != null && message.automationRuns.length) + for (var i = 0; i < message.automationRuns.length; ++i) + $root.google.cloud.deploy.v1.AutomationRun.encode(message.automationRuns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified TerminateJobRunResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.TerminateJobRunResponse.verify|verify} messages. + * Encodes the specified ListAutomationRunsResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.ListAutomationRunsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static - * @param {google.cloud.deploy.v1.ITerminateJobRunResponse} message TerminateJobRunResponse message or plain object to encode + * @param {google.cloud.deploy.v1.IListAutomationRunsResponse} message ListAutomationRunsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TerminateJobRunResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListAutomationRunsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TerminateJobRunResponse message from the specified reader or buffer. + * Decodes a ListAutomationRunsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse + * @returns {google.cloud.deploy.v1.ListAutomationRunsResponse} ListAutomationRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TerminateJobRunResponse.decode = function decode(reader, length) { + ListAutomationRunsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.TerminateJobRunResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.ListAutomationRunsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.automationRuns && message.automationRuns.length)) + message.automationRuns = []; + message.automationRuns.push($root.google.cloud.deploy.v1.AutomationRun.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -29122,112 +40400,169 @@ }; /** - * Decodes a TerminateJobRunResponse message from the specified reader or buffer, length delimited. + * Decodes a ListAutomationRunsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse + * @returns {google.cloud.deploy.v1.ListAutomationRunsResponse} ListAutomationRunsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TerminateJobRunResponse.decodeDelimited = function decodeDelimited(reader) { + ListAutomationRunsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TerminateJobRunResponse message. + * Verifies a ListAutomationRunsResponse message. * @function verify - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TerminateJobRunResponse.verify = function verify(message) { + ListAutomationRunsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.automationRuns != null && message.hasOwnProperty("automationRuns")) { + if (!Array.isArray(message.automationRuns)) + return "automationRuns: array expected"; + for (var i = 0; i < message.automationRuns.length; ++i) { + var error = $root.google.cloud.deploy.v1.AutomationRun.verify(message.automationRuns[i]); + if (error) + return "automationRuns." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a TerminateJobRunResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListAutomationRunsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.TerminateJobRunResponse} TerminateJobRunResponse + * @returns {google.cloud.deploy.v1.ListAutomationRunsResponse} ListAutomationRunsResponse */ - TerminateJobRunResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.TerminateJobRunResponse) + ListAutomationRunsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.ListAutomationRunsResponse) return object; - return new $root.google.cloud.deploy.v1.TerminateJobRunResponse(); + var message = new $root.google.cloud.deploy.v1.ListAutomationRunsResponse(); + if (object.automationRuns) { + if (!Array.isArray(object.automationRuns)) + throw TypeError(".google.cloud.deploy.v1.ListAutomationRunsResponse.automationRuns: array expected"); + message.automationRuns = []; + for (var i = 0; i < object.automationRuns.length; ++i) { + if (typeof object.automationRuns[i] !== "object") + throw TypeError(".google.cloud.deploy.v1.ListAutomationRunsResponse.automationRuns: object expected"); + message.automationRuns[i] = $root.google.cloud.deploy.v1.AutomationRun.fromObject(object.automationRuns[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.deploy.v1.ListAutomationRunsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; }; /** - * Creates a plain object from a TerminateJobRunResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListAutomationRunsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static - * @param {google.cloud.deploy.v1.TerminateJobRunResponse} message TerminateJobRunResponse + * @param {google.cloud.deploy.v1.ListAutomationRunsResponse} message ListAutomationRunsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TerminateJobRunResponse.toObject = function toObject() { - return {}; + ListAutomationRunsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.automationRuns = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.automationRuns && message.automationRuns.length) { + object.automationRuns = []; + for (var j = 0; j < message.automationRuns.length; ++j) + object.automationRuns[j] = $root.google.cloud.deploy.v1.AutomationRun.toObject(message.automationRuns[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; }; /** - * Converts this TerminateJobRunResponse to JSON. + * Converts this ListAutomationRunsResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @instance * @returns {Object.} JSON object */ - TerminateJobRunResponse.prototype.toJSON = function toJSON() { + ListAutomationRunsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TerminateJobRunResponse + * Gets the default type url for ListAutomationRunsResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.TerminateJobRunResponse + * @memberof google.cloud.deploy.v1.ListAutomationRunsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TerminateJobRunResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAutomationRunsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.TerminateJobRunResponse"; + return typeUrlPrefix + "/google.cloud.deploy.v1.ListAutomationRunsResponse"; }; - return TerminateJobRunResponse; + return ListAutomationRunsResponse; })(); - v1.Config = (function() { + v1.GetAutomationRunRequest = (function() { /** - * Properties of a Config. + * Properties of a GetAutomationRunRequest. * @memberof google.cloud.deploy.v1 - * @interface IConfig - * @property {string|null} [name] Config name - * @property {Array.|null} [supportedVersions] Config supportedVersions - * @property {string|null} [defaultSkaffoldVersion] Config defaultSkaffoldVersion + * @interface IGetAutomationRunRequest + * @property {string|null} [name] GetAutomationRunRequest name */ /** - * Constructs a new Config. + * Constructs a new GetAutomationRunRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a Config. - * @implements IConfig + * @classdesc Represents a GetAutomationRunRequest. + * @implements IGetAutomationRunRequest * @constructor - * @param {google.cloud.deploy.v1.IConfig=} [properties] Properties to set + * @param {google.cloud.deploy.v1.IGetAutomationRunRequest=} [properties] Properties to set */ - function Config(properties) { - this.supportedVersions = []; + function GetAutomationRunRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29235,91 +40570,70 @@ } /** - * Config name. + * GetAutomationRunRequest name. * @member {string} name - * @memberof google.cloud.deploy.v1.Config - * @instance - */ - Config.prototype.name = ""; - - /** - * Config supportedVersions. - * @member {Array.} supportedVersions - * @memberof google.cloud.deploy.v1.Config - * @instance - */ - Config.prototype.supportedVersions = $util.emptyArray; - - /** - * Config defaultSkaffoldVersion. - * @member {string} defaultSkaffoldVersion - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @instance */ - Config.prototype.defaultSkaffoldVersion = ""; + GetAutomationRunRequest.prototype.name = ""; /** - * Creates a new Config instance using the specified properties. + * Creates a new GetAutomationRunRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.IConfig=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.Config} Config instance + * @param {google.cloud.deploy.v1.IGetAutomationRunRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.GetAutomationRunRequest} GetAutomationRunRequest instance */ - Config.create = function create(properties) { - return new Config(properties); + GetAutomationRunRequest.create = function create(properties) { + return new GetAutomationRunRequest(properties); }; /** - * Encodes the specified Config message. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * Encodes the specified GetAutomationRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRunRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.IConfig} message Config message or plain object to encode + * @param {google.cloud.deploy.v1.IGetAutomationRunRequest} message GetAutomationRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Config.encode = function encode(message, writer) { + GetAutomationRunRequest.encode = function encode(message, writer) { 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.supportedVersions != null && message.supportedVersions.length) - for (var i = 0; i < message.supportedVersions.length; ++i) - $root.google.cloud.deploy.v1.SkaffoldVersion.encode(message.supportedVersions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.defaultSkaffoldVersion != null && Object.hasOwnProperty.call(message, "defaultSkaffoldVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultSkaffoldVersion); return writer; }; /** - * Encodes the specified Config message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.Config.verify|verify} messages. + * Encodes the specified GetAutomationRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetAutomationRunRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.IConfig} message Config message or plain object to encode + * @param {google.cloud.deploy.v1.IGetAutomationRunRequest} message GetAutomationRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Config.encodeDelimited = function encodeDelimited(message, writer) { + GetAutomationRunRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Config message from the specified reader or buffer. + * Decodes a GetAutomationRunRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.Config} Config + * @returns {google.cloud.deploy.v1.GetAutomationRunRequest} GetAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Config.decode = function decode(reader, length) { + GetAutomationRunRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.Config(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetAutomationRunRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -29327,16 +40641,6 @@ message.name = reader.string(); break; } - case 2: { - if (!(message.supportedVersions && message.supportedVersions.length)) - message.supportedVersions = []; - message.supportedVersions.push($root.google.cloud.deploy.v1.SkaffoldVersion.decode(reader, reader.uint32())); - break; - } - case 3: { - message.defaultSkaffoldVersion = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -29346,160 +40650,122 @@ }; /** - * Decodes a Config message from the specified reader or buffer, length delimited. + * Decodes a GetAutomationRunRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.Config} Config + * @returns {google.cloud.deploy.v1.GetAutomationRunRequest} GetAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Config.decodeDelimited = function decodeDelimited(reader) { + GetAutomationRunRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Config message. + * Verifies a GetAutomationRunRequest message. * @function verify - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Config.verify = function verify(message) { + GetAutomationRunRequest.verify = function verify(message) { if (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.supportedVersions != null && message.hasOwnProperty("supportedVersions")) { - if (!Array.isArray(message.supportedVersions)) - return "supportedVersions: array expected"; - for (var i = 0; i < message.supportedVersions.length; ++i) { - var error = $root.google.cloud.deploy.v1.SkaffoldVersion.verify(message.supportedVersions[i]); - if (error) - return "supportedVersions." + error; - } - } - if (message.defaultSkaffoldVersion != null && message.hasOwnProperty("defaultSkaffoldVersion")) - if (!$util.isString(message.defaultSkaffoldVersion)) - return "defaultSkaffoldVersion: string expected"; return null; }; /** - * Creates a Config message from a plain object. Also converts values to their respective internal types. + * Creates a GetAutomationRunRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.Config} Config + * @returns {google.cloud.deploy.v1.GetAutomationRunRequest} GetAutomationRunRequest */ - Config.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.Config) + GetAutomationRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.GetAutomationRunRequest) return object; - var message = new $root.google.cloud.deploy.v1.Config(); + var message = new $root.google.cloud.deploy.v1.GetAutomationRunRequest(); if (object.name != null) message.name = String(object.name); - if (object.supportedVersions) { - if (!Array.isArray(object.supportedVersions)) - throw TypeError(".google.cloud.deploy.v1.Config.supportedVersions: array expected"); - message.supportedVersions = []; - for (var i = 0; i < object.supportedVersions.length; ++i) { - if (typeof object.supportedVersions[i] !== "object") - throw TypeError(".google.cloud.deploy.v1.Config.supportedVersions: object expected"); - message.supportedVersions[i] = $root.google.cloud.deploy.v1.SkaffoldVersion.fromObject(object.supportedVersions[i]); - } - } - if (object.defaultSkaffoldVersion != null) - message.defaultSkaffoldVersion = String(object.defaultSkaffoldVersion); return message; }; /** - * Creates a plain object from a Config message. Also converts values to other types if specified. + * Creates a plain object from a GetAutomationRunRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.Config} message Config + * @param {google.cloud.deploy.v1.GetAutomationRunRequest} message GetAutomationRunRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Config.toObject = function toObject(message, options) { + GetAutomationRunRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.supportedVersions = []; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.defaultSkaffoldVersion = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.supportedVersions && message.supportedVersions.length) { - object.supportedVersions = []; - for (var j = 0; j < message.supportedVersions.length; ++j) - object.supportedVersions[j] = $root.google.cloud.deploy.v1.SkaffoldVersion.toObject(message.supportedVersions[j], options); - } - if (message.defaultSkaffoldVersion != null && message.hasOwnProperty("defaultSkaffoldVersion")) - object.defaultSkaffoldVersion = message.defaultSkaffoldVersion; return object; }; /** - * Converts this Config to JSON. + * Converts this GetAutomationRunRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @instance * @returns {Object.} JSON object */ - Config.prototype.toJSON = function toJSON() { + GetAutomationRunRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Config + * Gets the default type url for GetAutomationRunRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.Config + * @memberof google.cloud.deploy.v1.GetAutomationRunRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAutomationRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.Config"; + return typeUrlPrefix + "/google.cloud.deploy.v1.GetAutomationRunRequest"; }; - return Config; + return GetAutomationRunRequest; })(); - v1.SkaffoldVersion = (function() { + v1.CancelAutomationRunRequest = (function() { /** - * Properties of a SkaffoldVersion. + * Properties of a CancelAutomationRunRequest. * @memberof google.cloud.deploy.v1 - * @interface ISkaffoldVersion - * @property {string|null} [version] SkaffoldVersion version - * @property {google.protobuf.ITimestamp|null} [maintenanceModeTime] SkaffoldVersion maintenanceModeTime - * @property {google.protobuf.ITimestamp|null} [supportExpirationTime] SkaffoldVersion supportExpirationTime - * @property {google.type.IDate|null} [supportEndDate] SkaffoldVersion supportEndDate + * @interface ICancelAutomationRunRequest + * @property {string|null} [name] CancelAutomationRunRequest name */ /** - * Constructs a new SkaffoldVersion. + * Constructs a new CancelAutomationRunRequest. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a SkaffoldVersion. - * @implements ISkaffoldVersion + * @classdesc Represents a CancelAutomationRunRequest. + * @implements ICancelAutomationRunRequest * @constructor - * @param {google.cloud.deploy.v1.ISkaffoldVersion=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICancelAutomationRunRequest=} [properties] Properties to set */ - function SkaffoldVersion(properties) { + function CancelAutomationRunRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29507,117 +40773,75 @@ } /** - * SkaffoldVersion version. - * @member {string} version - * @memberof google.cloud.deploy.v1.SkaffoldVersion - * @instance - */ - SkaffoldVersion.prototype.version = ""; - - /** - * SkaffoldVersion maintenanceModeTime. - * @member {google.protobuf.ITimestamp|null|undefined} maintenanceModeTime - * @memberof google.cloud.deploy.v1.SkaffoldVersion - * @instance - */ - SkaffoldVersion.prototype.maintenanceModeTime = null; - - /** - * SkaffoldVersion supportExpirationTime. - * @member {google.protobuf.ITimestamp|null|undefined} supportExpirationTime - * @memberof google.cloud.deploy.v1.SkaffoldVersion - * @instance - */ - SkaffoldVersion.prototype.supportExpirationTime = null; - - /** - * SkaffoldVersion supportEndDate. - * @member {google.type.IDate|null|undefined} supportEndDate - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * CancelAutomationRunRequest name. + * @member {string} name + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @instance */ - SkaffoldVersion.prototype.supportEndDate = null; + CancelAutomationRunRequest.prototype.name = ""; /** - * Creates a new SkaffoldVersion instance using the specified properties. + * Creates a new CancelAutomationRunRequest instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.ISkaffoldVersion=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion instance + * @param {google.cloud.deploy.v1.ICancelAutomationRunRequest=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CancelAutomationRunRequest} CancelAutomationRunRequest instance */ - SkaffoldVersion.create = function create(properties) { - return new SkaffoldVersion(properties); + CancelAutomationRunRequest.create = function create(properties) { + return new CancelAutomationRunRequest(properties); }; /** - * Encodes the specified SkaffoldVersion message. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * Encodes the specified CancelAutomationRunRequest message. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.ISkaffoldVersion} message SkaffoldVersion message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelAutomationRunRequest} message CancelAutomationRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SkaffoldVersion.encode = function encode(message, writer) { + CancelAutomationRunRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.supportEndDate != null && Object.hasOwnProperty.call(message, "supportEndDate")) - $root.google.type.Date.encode(message.supportEndDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maintenanceModeTime != null && Object.hasOwnProperty.call(message, "maintenanceModeTime")) - $root.google.protobuf.Timestamp.encode(message.maintenanceModeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.supportExpirationTime != null && Object.hasOwnProperty.call(message, "supportExpirationTime")) - $root.google.protobuf.Timestamp.encode(message.supportExpirationTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified SkaffoldVersion message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.SkaffoldVersion.verify|verify} messages. + * Encodes the specified CancelAutomationRunRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.ISkaffoldVersion} message SkaffoldVersion message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelAutomationRunRequest} message CancelAutomationRunRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SkaffoldVersion.encodeDelimited = function encodeDelimited(message, writer) { + CancelAutomationRunRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SkaffoldVersion message from the specified reader or buffer. + * Decodes a CancelAutomationRunRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion + * @returns {google.cloud.deploy.v1.CancelAutomationRunRequest} CancelAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SkaffoldVersion.decode = function decode(reader, length) { + CancelAutomationRunRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.SkaffoldVersion(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CancelAutomationRunRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); - break; - } - case 3: { - message.maintenanceModeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.supportExpirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.supportEndDate = $root.google.type.Date.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -29629,162 +40853,121 @@ }; /** - * Decodes a SkaffoldVersion message from the specified reader or buffer, length delimited. + * Decodes a CancelAutomationRunRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion + * @returns {google.cloud.deploy.v1.CancelAutomationRunRequest} CancelAutomationRunRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SkaffoldVersion.decodeDelimited = function decodeDelimited(reader) { + CancelAutomationRunRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SkaffoldVersion message. + * Verifies a CancelAutomationRunRequest message. * @function verify - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SkaffoldVersion.verify = function verify(message) { + CancelAutomationRunRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.maintenanceModeTime); - if (error) - return "maintenanceModeTime." + error; - } - if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.supportExpirationTime); - if (error) - return "supportExpirationTime." + error; - } - if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) { - var error = $root.google.type.Date.verify(message.supportEndDate); - if (error) - return "supportEndDate." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a SkaffoldVersion message from a plain object. Also converts values to their respective internal types. + * Creates a CancelAutomationRunRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.SkaffoldVersion} SkaffoldVersion + * @returns {google.cloud.deploy.v1.CancelAutomationRunRequest} CancelAutomationRunRequest */ - SkaffoldVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.SkaffoldVersion) + CancelAutomationRunRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CancelAutomationRunRequest) return object; - var message = new $root.google.cloud.deploy.v1.SkaffoldVersion(); - if (object.version != null) - message.version = String(object.version); - if (object.maintenanceModeTime != null) { - if (typeof object.maintenanceModeTime !== "object") - throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.maintenanceModeTime: object expected"); - message.maintenanceModeTime = $root.google.protobuf.Timestamp.fromObject(object.maintenanceModeTime); - } - if (object.supportExpirationTime != null) { - if (typeof object.supportExpirationTime !== "object") - throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.supportExpirationTime: object expected"); - message.supportExpirationTime = $root.google.protobuf.Timestamp.fromObject(object.supportExpirationTime); - } - if (object.supportEndDate != null) { - if (typeof object.supportEndDate !== "object") - throw TypeError(".google.cloud.deploy.v1.SkaffoldVersion.supportEndDate: object expected"); - message.supportEndDate = $root.google.type.Date.fromObject(object.supportEndDate); - } + var message = new $root.google.cloud.deploy.v1.CancelAutomationRunRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a SkaffoldVersion message. Also converts values to other types if specified. + * Creates a plain object from a CancelAutomationRunRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static - * @param {google.cloud.deploy.v1.SkaffoldVersion} message SkaffoldVersion + * @param {google.cloud.deploy.v1.CancelAutomationRunRequest} message CancelAutomationRunRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SkaffoldVersion.toObject = function toObject(message, options) { + CancelAutomationRunRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.version = ""; - object.supportEndDate = null; - object.maintenanceModeTime = null; - object.supportExpirationTime = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.supportEndDate != null && message.hasOwnProperty("supportEndDate")) - object.supportEndDate = $root.google.type.Date.toObject(message.supportEndDate, options); - if (message.maintenanceModeTime != null && message.hasOwnProperty("maintenanceModeTime")) - object.maintenanceModeTime = $root.google.protobuf.Timestamp.toObject(message.maintenanceModeTime, options); - if (message.supportExpirationTime != null && message.hasOwnProperty("supportExpirationTime")) - object.supportExpirationTime = $root.google.protobuf.Timestamp.toObject(message.supportExpirationTime, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this SkaffoldVersion to JSON. + * Converts this CancelAutomationRunRequest to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @instance * @returns {Object.} JSON object */ - SkaffoldVersion.prototype.toJSON = function toJSON() { + CancelAutomationRunRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SkaffoldVersion + * Gets the default type url for CancelAutomationRunRequest * @function getTypeUrl - * @memberof google.cloud.deploy.v1.SkaffoldVersion + * @memberof google.cloud.deploy.v1.CancelAutomationRunRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SkaffoldVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelAutomationRunRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.SkaffoldVersion"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CancelAutomationRunRequest"; }; - return SkaffoldVersion; + return CancelAutomationRunRequest; })(); - v1.GetConfigRequest = (function() { + v1.CancelAutomationRunResponse = (function() { /** - * Properties of a GetConfigRequest. + * Properties of a CancelAutomationRunResponse. * @memberof google.cloud.deploy.v1 - * @interface IGetConfigRequest - * @property {string|null} [name] GetConfigRequest name + * @interface ICancelAutomationRunResponse */ /** - * Constructs a new GetConfigRequest. + * Constructs a new CancelAutomationRunResponse. * @memberof google.cloud.deploy.v1 - * @classdesc Represents a GetConfigRequest. - * @implements IGetConfigRequest + * @classdesc Represents a CancelAutomationRunResponse. + * @implements ICancelAutomationRunResponse * @constructor - * @param {google.cloud.deploy.v1.IGetConfigRequest=} [properties] Properties to set + * @param {google.cloud.deploy.v1.ICancelAutomationRunResponse=} [properties] Properties to set */ - function GetConfigRequest(properties) { + function CancelAutomationRunResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29792,77 +40975,63 @@ } /** - * GetConfigRequest name. - * @member {string} name - * @memberof google.cloud.deploy.v1.GetConfigRequest - * @instance - */ - GetConfigRequest.prototype.name = ""; - - /** - * Creates a new GetConfigRequest instance using the specified properties. + * Creates a new CancelAutomationRunResponse instance using the specified properties. * @function create - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static - * @param {google.cloud.deploy.v1.IGetConfigRequest=} [properties] Properties to set - * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest instance + * @param {google.cloud.deploy.v1.ICancelAutomationRunResponse=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.CancelAutomationRunResponse} CancelAutomationRunResponse instance */ - GetConfigRequest.create = function create(properties) { - return new GetConfigRequest(properties); + CancelAutomationRunResponse.create = function create(properties) { + return new CancelAutomationRunResponse(properties); }; /** - * Encodes the specified GetConfigRequest message. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * Encodes the specified CancelAutomationRunResponse message. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static - * @param {google.cloud.deploy.v1.IGetConfigRequest} message GetConfigRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelAutomationRunResponse} message CancelAutomationRunResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConfigRequest.encode = function encode(message, writer) { + CancelAutomationRunResponse.encode = function encode(message, writer) { 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 GetConfigRequest message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.GetConfigRequest.verify|verify} messages. + * Encodes the specified CancelAutomationRunResponse message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.CancelAutomationRunResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static - * @param {google.cloud.deploy.v1.IGetConfigRequest} message GetConfigRequest message or plain object to encode + * @param {google.cloud.deploy.v1.ICancelAutomationRunResponse} message CancelAutomationRunResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + CancelAutomationRunResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConfigRequest message from the specified reader or buffer. + * Decodes a CancelAutomationRunResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest + * @returns {google.cloud.deploy.v1.CancelAutomationRunResponse} CancelAutomationRunResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConfigRequest.decode = function decode(reader, length) { + CancelAutomationRunResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.GetConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.CancelAutomationRunResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -29872,102 +41041,89 @@ }; /** - * Decodes a GetConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a CancelAutomationRunResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest + * @returns {google.cloud.deploy.v1.CancelAutomationRunResponse} CancelAutomationRunResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConfigRequest.decodeDelimited = function decodeDelimited(reader) { + CancelAutomationRunResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConfigRequest message. + * Verifies a CancelAutomationRunResponse message. * @function verify - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConfigRequest.verify = function verify(message) { + CancelAutomationRunResponse.verify = function verify(message) { if (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 GetConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CancelAutomationRunResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.deploy.v1.GetConfigRequest} GetConfigRequest + * @returns {google.cloud.deploy.v1.CancelAutomationRunResponse} CancelAutomationRunResponse */ - GetConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.deploy.v1.GetConfigRequest) + CancelAutomationRunResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.CancelAutomationRunResponse) return object; - var message = new $root.google.cloud.deploy.v1.GetConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.cloud.deploy.v1.CancelAutomationRunResponse(); }; /** - * Creates a plain object from a GetConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a CancelAutomationRunResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static - * @param {google.cloud.deploy.v1.GetConfigRequest} message GetConfigRequest + * @param {google.cloud.deploy.v1.CancelAutomationRunResponse} message CancelAutomationRunResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConfigRequest.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; + CancelAutomationRunResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetConfigRequest to JSON. + * Converts this CancelAutomationRunResponse to JSON. * @function toJSON - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @instance * @returns {Object.} JSON object */ - GetConfigRequest.prototype.toJSON = function toJSON() { + CancelAutomationRunResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetConfigRequest + * Gets the default type url for CancelAutomationRunResponse * @function getTypeUrl - * @memberof google.cloud.deploy.v1.GetConfigRequest + * @memberof google.cloud.deploy.v1.CancelAutomationRunResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CancelAutomationRunResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.deploy.v1.GetConfigRequest"; + return typeUrlPrefix + "/google.cloud.deploy.v1.CancelAutomationRunResponse"; }; - return GetConfigRequest; + return CancelAutomationRunResponse; })(); /** @@ -29988,6 +41144,46 @@ return values; })(); + /** + * BackoffMode enum. + * @name google.cloud.deploy.v1.BackoffMode + * @enum {number} + * @property {number} BACKOFF_MODE_UNSPECIFIED=0 BACKOFF_MODE_UNSPECIFIED value + * @property {number} BACKOFF_MODE_LINEAR=1 BACKOFF_MODE_LINEAR value + * @property {number} BACKOFF_MODE_EXPONENTIAL=2 BACKOFF_MODE_EXPONENTIAL value + */ + v1.BackoffMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKOFF_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKOFF_MODE_LINEAR"] = 1; + values[valuesById[2] = "BACKOFF_MODE_EXPONENTIAL"] = 2; + return values; + })(); + + /** + * RepairState enum. + * @name google.cloud.deploy.v1.RepairState + * @enum {number} + * @property {number} REPAIR_STATE_UNSPECIFIED=0 REPAIR_STATE_UNSPECIFIED value + * @property {number} REPAIR_STATE_SUCCEEDED=1 REPAIR_STATE_SUCCEEDED value + * @property {number} REPAIR_STATE_CANCELLED=2 REPAIR_STATE_CANCELLED value + * @property {number} REPAIR_STATE_FAILED=3 REPAIR_STATE_FAILED value + * @property {number} REPAIR_STATE_IN_PROGRESS=4 REPAIR_STATE_IN_PROGRESS value + * @property {number} REPAIR_STATE_PENDING=5 REPAIR_STATE_PENDING value + * @property {number} REPAIR_STATE_SKIPPED=6 REPAIR_STATE_SKIPPED value + */ + v1.RepairState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPAIR_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REPAIR_STATE_SUCCEEDED"] = 1; + values[valuesById[2] = "REPAIR_STATE_CANCELLED"] = 2; + values[valuesById[3] = "REPAIR_STATE_FAILED"] = 3; + values[valuesById[4] = "REPAIR_STATE_IN_PROGRESS"] = 4; + values[valuesById[5] = "REPAIR_STATE_PENDING"] = 5; + values[valuesById[6] = "REPAIR_STATE_SKIPPED"] = 6; + return values; + })(); + v1.DeliveryPipelineNotificationEvent = (function() { /** @@ -30287,32 +41483,6 @@ return DeliveryPipelineNotificationEvent; })(); - /** - * Type enum. - * @name google.cloud.deploy.v1.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} TYPE_PUBSUB_NOTIFICATION_FAILURE=1 TYPE_PUBSUB_NOTIFICATION_FAILURE value - * @property {number} TYPE_RESOURCE_STATE_CHANGE=3 TYPE_RESOURCE_STATE_CHANGE value - * @property {number} TYPE_PROCESS_ABORTED=4 TYPE_PROCESS_ABORTED value - * @property {number} TYPE_RESTRICTION_VIOLATED=5 TYPE_RESTRICTION_VIOLATED value - * @property {number} TYPE_RESOURCE_DELETED=6 TYPE_RESOURCE_DELETED value - * @property {number} TYPE_ROLLOUT_UPDATE=7 TYPE_ROLLOUT_UPDATE value - * @property {number} TYPE_RENDER_STATUES_CHANGE=2 TYPE_RENDER_STATUES_CHANGE value - */ - v1.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_PUBSUB_NOTIFICATION_FAILURE"] = 1; - values[valuesById[3] = "TYPE_RESOURCE_STATE_CHANGE"] = 3; - values[valuesById[4] = "TYPE_PROCESS_ABORTED"] = 4; - values[valuesById[5] = "TYPE_RESTRICTION_VIOLATED"] = 5; - values[valuesById[6] = "TYPE_RESOURCE_DELETED"] = 6; - values[valuesById[7] = "TYPE_ROLLOUT_UPDATE"] = 7; - values[valuesById[2] = "TYPE_RENDER_STATUES_CHANGE"] = 2; - return values; - })(); - v1.JobRunNotificationEvent = (function() { /** @@ -31011,6 +42181,7 @@ * @interface IReleaseRenderEvent * @property {string|null} [message] ReleaseRenderEvent message * @property {string|null} [release] ReleaseRenderEvent release + * @property {google.cloud.deploy.v1.Release.RenderState|null} [releaseRenderState] ReleaseRenderEvent releaseRenderState */ /** @@ -31044,6 +42215,14 @@ */ ReleaseRenderEvent.prototype.release = ""; + /** + * ReleaseRenderEvent releaseRenderState. + * @member {google.cloud.deploy.v1.Release.RenderState} releaseRenderState + * @memberof google.cloud.deploy.v1.ReleaseRenderEvent + * @instance + */ + ReleaseRenderEvent.prototype.releaseRenderState = 0; + /** * Creates a new ReleaseRenderEvent instance using the specified properties. * @function create @@ -31072,6 +42251,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); if (message.release != null && Object.hasOwnProperty.call(message, "release")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.release); + if (message.releaseRenderState != null && Object.hasOwnProperty.call(message, "releaseRenderState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.releaseRenderState); return writer; }; @@ -31114,6 +42295,10 @@ message.release = reader.string(); break; } + case 3: { + message.releaseRenderState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -31155,6 +42340,16 @@ if (message.release != null && message.hasOwnProperty("release")) if (!$util.isString(message.release)) return "release: string expected"; + if (message.releaseRenderState != null && message.hasOwnProperty("releaseRenderState")) + switch (message.releaseRenderState) { + default: + return "releaseRenderState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; @@ -31174,6 +42369,30 @@ message.message = String(object.message); if (object.release != null) message.release = String(object.release); + switch (object.releaseRenderState) { + default: + if (typeof object.releaseRenderState === "number") { + message.releaseRenderState = object.releaseRenderState; + break; + } + break; + case "RENDER_STATE_UNSPECIFIED": + case 0: + message.releaseRenderState = 0; + break; + case "SUCCEEDED": + case 1: + message.releaseRenderState = 1; + break; + case "FAILED": + case 2: + message.releaseRenderState = 2; + break; + case "IN_PROGRESS": + case 3: + message.releaseRenderState = 3; + break; + } return message; }; @@ -31193,11 +42412,14 @@ if (options.defaults) { object.message = ""; object.release = ""; + object.releaseRenderState = options.enums === String ? "RENDER_STATE_UNSPECIFIED" : 0; } if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; if (message.release != null && message.hasOwnProperty("release")) object.release = message.release; + if (message.releaseRenderState != null && message.hasOwnProperty("releaseRenderState")) + object.releaseRenderState = options.enums === String ? $root.google.cloud.deploy.v1.Release.RenderState[message.releaseRenderState] === undefined ? message.releaseRenderState : $root.google.cloud.deploy.v1.Release.RenderState[message.releaseRenderState] : message.releaseRenderState; return object; }; @@ -31598,6 +42820,514 @@ return RolloutNotificationEvent; })(); + v1.RolloutUpdateEvent = (function() { + + /** + * Properties of a RolloutUpdateEvent. + * @memberof google.cloud.deploy.v1 + * @interface IRolloutUpdateEvent + * @property {string|null} [pipelineUid] RolloutUpdateEvent pipelineUid + * @property {string|null} [releaseUid] RolloutUpdateEvent releaseUid + * @property {string|null} [rollout] RolloutUpdateEvent rollout + * @property {string|null} [targetId] RolloutUpdateEvent targetId + * @property {google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType|null} [rolloutUpdateType] RolloutUpdateEvent rolloutUpdateType + * @property {string|null} [message] RolloutUpdateEvent message + * @property {google.cloud.deploy.v1.Type|null} [type] RolloutUpdateEvent type + */ + + /** + * Constructs a new RolloutUpdateEvent. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a RolloutUpdateEvent. + * @implements IRolloutUpdateEvent + * @constructor + * @param {google.cloud.deploy.v1.IRolloutUpdateEvent=} [properties] Properties to set + */ + function RolloutUpdateEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RolloutUpdateEvent pipelineUid. + * @member {string} pipelineUid + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.pipelineUid = ""; + + /** + * RolloutUpdateEvent releaseUid. + * @member {string} releaseUid + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.releaseUid = ""; + + /** + * RolloutUpdateEvent rollout. + * @member {string} rollout + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.rollout = ""; + + /** + * RolloutUpdateEvent targetId. + * @member {string} targetId + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.targetId = ""; + + /** + * RolloutUpdateEvent rolloutUpdateType. + * @member {google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType} rolloutUpdateType + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.rolloutUpdateType = 0; + + /** + * RolloutUpdateEvent message. + * @member {string} message + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.message = ""; + + /** + * RolloutUpdateEvent type. + * @member {google.cloud.deploy.v1.Type} type + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + */ + RolloutUpdateEvent.prototype.type = 0; + + /** + * Creates a new RolloutUpdateEvent instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {google.cloud.deploy.v1.IRolloutUpdateEvent=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.RolloutUpdateEvent} RolloutUpdateEvent instance + */ + RolloutUpdateEvent.create = function create(properties) { + return new RolloutUpdateEvent(properties); + }; + + /** + * Encodes the specified RolloutUpdateEvent message. Does not implicitly {@link google.cloud.deploy.v1.RolloutUpdateEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {google.cloud.deploy.v1.IRolloutUpdateEvent} message RolloutUpdateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutUpdateEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pipelineUid != null && Object.hasOwnProperty.call(message, "pipelineUid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pipelineUid); + if (message.releaseUid != null && Object.hasOwnProperty.call(message, "releaseUid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.releaseUid); + if (message.rollout != null && Object.hasOwnProperty.call(message, "rollout")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rollout); + if (message.targetId != null && Object.hasOwnProperty.call(message, "targetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetId); + if (message.rolloutUpdateType != null && Object.hasOwnProperty.call(message, "rolloutUpdateType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.rolloutUpdateType); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + return writer; + }; + + /** + * Encodes the specified RolloutUpdateEvent message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.RolloutUpdateEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {google.cloud.deploy.v1.IRolloutUpdateEvent} message RolloutUpdateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RolloutUpdateEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RolloutUpdateEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.RolloutUpdateEvent} RolloutUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutUpdateEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.RolloutUpdateEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pipelineUid = reader.string(); + break; + } + case 2: { + message.releaseUid = reader.string(); + break; + } + case 3: { + message.rollout = reader.string(); + break; + } + case 4: { + message.targetId = reader.string(); + break; + } + case 5: { + message.rolloutUpdateType = reader.int32(); + break; + } + case 6: { + message.message = reader.string(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RolloutUpdateEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.RolloutUpdateEvent} RolloutUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RolloutUpdateEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RolloutUpdateEvent message. + * @function verify + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RolloutUpdateEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + if (!$util.isString(message.pipelineUid)) + return "pipelineUid: string expected"; + if (message.releaseUid != null && message.hasOwnProperty("releaseUid")) + if (!$util.isString(message.releaseUid)) + return "releaseUid: string expected"; + if (message.rollout != null && message.hasOwnProperty("rollout")) + if (!$util.isString(message.rollout)) + return "rollout: string expected"; + if (message.targetId != null && message.hasOwnProperty("targetId")) + if (!$util.isString(message.targetId)) + return "targetId: string expected"; + if (message.rolloutUpdateType != null && message.hasOwnProperty("rolloutUpdateType")) + switch (message.rolloutUpdateType) { + default: + return "rolloutUpdateType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 2: + break; + } + return null; + }; + + /** + * Creates a RolloutUpdateEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.RolloutUpdateEvent} RolloutUpdateEvent + */ + RolloutUpdateEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.RolloutUpdateEvent) + return object; + var message = new $root.google.cloud.deploy.v1.RolloutUpdateEvent(); + if (object.pipelineUid != null) + message.pipelineUid = String(object.pipelineUid); + if (object.releaseUid != null) + message.releaseUid = String(object.releaseUid); + if (object.rollout != null) + message.rollout = String(object.rollout); + if (object.targetId != null) + message.targetId = String(object.targetId); + switch (object.rolloutUpdateType) { + default: + if (typeof object.rolloutUpdateType === "number") { + message.rolloutUpdateType = object.rolloutUpdateType; + break; + } + break; + case "ROLLOUT_UPDATE_TYPE_UNSPECIFIED": + case 0: + message.rolloutUpdateType = 0; + break; + case "PENDING": + case 1: + message.rolloutUpdateType = 1; + break; + case "PENDING_RELEASE": + case 2: + message.rolloutUpdateType = 2; + break; + case "IN_PROGRESS": + case 3: + message.rolloutUpdateType = 3; + break; + case "CANCELLING": + case 4: + message.rolloutUpdateType = 4; + break; + case "CANCELLED": + case 5: + message.rolloutUpdateType = 5; + break; + case "HALTED": + case 6: + message.rolloutUpdateType = 6; + break; + case "SUCCEEDED": + case 7: + message.rolloutUpdateType = 7; + break; + case "FAILED": + case 8: + message.rolloutUpdateType = 8; + break; + case "APPROVAL_REQUIRED": + case 9: + message.rolloutUpdateType = 9; + break; + case "APPROVED": + case 10: + message.rolloutUpdateType = 10; + break; + case "REJECTED": + case 11: + message.rolloutUpdateType = 11; + break; + case "ADVANCE_REQUIRED": + case 12: + message.rolloutUpdateType = 12; + break; + case "ADVANCED": + case 13: + message.rolloutUpdateType = 13; + break; + } + if (object.message != null) + message.message = String(object.message); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TYPE_PUBSUB_NOTIFICATION_FAILURE": + case 1: + message.type = 1; + break; + case "TYPE_RESOURCE_STATE_CHANGE": + case 3: + message.type = 3; + break; + case "TYPE_PROCESS_ABORTED": + case 4: + message.type = 4; + break; + case "TYPE_RESTRICTION_VIOLATED": + case 5: + message.type = 5; + break; + case "TYPE_RESOURCE_DELETED": + case 6: + message.type = 6; + break; + case "TYPE_ROLLOUT_UPDATE": + case 7: + message.type = 7; + break; + case "TYPE_RENDER_STATUES_CHANGE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a RolloutUpdateEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {google.cloud.deploy.v1.RolloutUpdateEvent} message RolloutUpdateEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RolloutUpdateEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pipelineUid = ""; + object.releaseUid = ""; + object.rollout = ""; + object.targetId = ""; + object.rolloutUpdateType = options.enums === String ? "ROLLOUT_UPDATE_TYPE_UNSPECIFIED" : 0; + object.message = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.pipelineUid != null && message.hasOwnProperty("pipelineUid")) + object.pipelineUid = message.pipelineUid; + if (message.releaseUid != null && message.hasOwnProperty("releaseUid")) + object.releaseUid = message.releaseUid; + if (message.rollout != null && message.hasOwnProperty("rollout")) + object.rollout = message.rollout; + if (message.targetId != null && message.hasOwnProperty("targetId")) + object.targetId = message.targetId; + if (message.rolloutUpdateType != null && message.hasOwnProperty("rolloutUpdateType")) + object.rolloutUpdateType = options.enums === String ? $root.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType[message.rolloutUpdateType] === undefined ? message.rolloutUpdateType : $root.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType[message.rolloutUpdateType] : message.rolloutUpdateType; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.deploy.v1.Type[message.type] === undefined ? message.type : $root.google.cloud.deploy.v1.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this RolloutUpdateEvent to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @instance + * @returns {Object.} JSON object + */ + RolloutUpdateEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RolloutUpdateEvent + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.RolloutUpdateEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RolloutUpdateEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.RolloutUpdateEvent"; + }; + + /** + * RolloutUpdateType enum. + * @name google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType + * @enum {number} + * @property {number} ROLLOUT_UPDATE_TYPE_UNSPECIFIED=0 ROLLOUT_UPDATE_TYPE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} PENDING_RELEASE=2 PENDING_RELEASE value + * @property {number} IN_PROGRESS=3 IN_PROGRESS value + * @property {number} CANCELLING=4 CANCELLING value + * @property {number} CANCELLED=5 CANCELLED value + * @property {number} HALTED=6 HALTED value + * @property {number} SUCCEEDED=7 SUCCEEDED value + * @property {number} FAILED=8 FAILED value + * @property {number} APPROVAL_REQUIRED=9 APPROVAL_REQUIRED value + * @property {number} APPROVED=10 APPROVED value + * @property {number} REJECTED=11 REJECTED value + * @property {number} ADVANCE_REQUIRED=12 ADVANCE_REQUIRED value + * @property {number} ADVANCED=13 ADVANCED value + */ + RolloutUpdateEvent.RolloutUpdateType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLLOUT_UPDATE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "PENDING_RELEASE"] = 2; + values[valuesById[3] = "IN_PROGRESS"] = 3; + values[valuesById[4] = "CANCELLING"] = 4; + values[valuesById[5] = "CANCELLED"] = 5; + values[valuesById[6] = "HALTED"] = 6; + values[valuesById[7] = "SUCCEEDED"] = 7; + values[valuesById[8] = "FAILED"] = 8; + values[valuesById[9] = "APPROVAL_REQUIRED"] = 9; + values[valuesById[10] = "APPROVED"] = 10; + values[valuesById[11] = "REJECTED"] = 11; + values[valuesById[12] = "ADVANCE_REQUIRED"] = 12; + values[valuesById[13] = "ADVANCED"] = 13; + return values; + })(); + + return RolloutUpdateEvent; + })(); + v1.TargetNotificationEvent = (function() { /** diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index 89e4947b5f8..006065a3175 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -12,10 +12,79 @@ "java_multiple_files": true, "java_outer_classname": "TargetNotificationPayloadProto", "java_package": "com.google.cloud.deploy.v1", - "(google.api.resource_definition).type": "run.googleapis.com/Service", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/services/{service}" + "(google.api.resource_definition).type": "run.googleapis.com/Job", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/jobs/{job}" }, "nested": { + "AutomationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "automation": { + "type": "string", + "id": 2 + }, + "pipelineUid": { + "type": "string", + "id": 3 + }, + "type": { + "type": "Type", + "id": 4 + } + } + }, + "Type": { + "valuesOptions": { + "TYPE_RENDER_STATUES_CHANGE": { + "deprecated": true + } + }, + "values": { + "TYPE_UNSPECIFIED": 0, + "TYPE_PUBSUB_NOTIFICATION_FAILURE": 1, + "TYPE_RESOURCE_STATE_CHANGE": 3, + "TYPE_PROCESS_ABORTED": 4, + "TYPE_RESTRICTION_VIOLATED": 5, + "TYPE_RESOURCE_DELETED": 6, + "TYPE_ROLLOUT_UPDATE": 7, + "TYPE_RENDER_STATUES_CHANGE": 2 + } + }, + "AutomationRunEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "automationRun": { + "type": "string", + "id": 2 + }, + "pipelineUid": { + "type": "string", + "id": 3 + }, + "automationId": { + "type": "string", + "id": 4 + }, + "ruleId": { + "type": "string", + "id": 5 + }, + "destinationTargetId": { + "type": "string", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + } + } + }, "CloudDeploy": { "options": { "(google.api.default_host)": "clouddeploy.googleapis.com", @@ -158,6 +227,26 @@ } ] }, + "RollbackTarget": { + "requestType": "RollbackTargetRequest", + "responseType": "RollbackTargetResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,target_id,rollout_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,target_id,rollout_id" + } + ] + }, "GetTarget": { "requestType": "GetTargetRequest", "responseType": "Target", @@ -579,6 +668,180 @@ "(google.api.method_signature)": "name" } ] + }, + "CreateAutomation": { + "requestType": "CreateAutomationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations", + "(google.api.http).body": "automation", + "(google.api.method_signature)": "parent,automation,automation_id", + "(google.longrunning.operation_info).response_type": "Automation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations", + "body": "automation" + } + }, + { + "(google.api.method_signature)": "parent,automation,automation_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Automation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateAutomation": { + "requestType": "UpdateAutomationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + "(google.api.http).body": "automation", + "(google.api.method_signature)": "automation,update_mask", + "(google.longrunning.operation_info).response_type": "Automation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + "body": "automation" + } + }, + { + "(google.api.method_signature)": "automation,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Automation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAutomation": { + "requestType": "DeleteAutomationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetAutomation": { + "requestType": "GetAutomationRequest", + "responseType": "Automation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAutomations": { + "requestType": "ListAutomationsRequest", + "responseType": "ListAutomationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAutomationRun": { + "requestType": "GetAutomationRunRequest", + "responseType": "AutomationRun", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAutomationRuns": { + "requestType": "ListAutomationRunsRequest", + "responseType": "ListAutomationRunsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CancelAutomationRun": { + "requestType": "CancelAutomationRunRequest", + "responseType": "CancelAutomationRunResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -1244,78 +1507,158 @@ } } }, - "Target": { - "options": { - "(google.api.resource).type": "clouddeploy.googleapis.com/Target", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/targets/{target}" - }, - "oneofs": { - "deploymentTarget": { - "oneof": [ - "gke", - "anthosCluster", - "run", - "multiTarget" - ] + "RollbackTargetConfig": { + "fields": { + "rollout": { + "type": "Rollout", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "startingPhaseId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - }, + } + }, + "RollbackTargetRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/DeliveryPipeline" } }, "targetId": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "uid": { + "rolloutId": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "description": { + "releaseId": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "annotations": { - "keyType": "string", + "rolloutToRollBack": { "type": "string", "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "labels": { - "keyType": "string", - "type": "string", + "rollbackConfig": { + "type": "RollbackTargetConfig", "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "requireApproval": { + "validateOnly": { "type": "bool", - "id": 13, + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "RollbackTargetResponse": { + "fields": { + "rollbackConfig": { + "type": "RollbackTargetConfig", + "id": 1 + } + } + }, + "Target": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Target", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/targets/{target}" + }, + "oneofs": { + "deploymentTarget": { + "oneof": [ + "gke", + "anthosCluster", + "run", + "multiTarget" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "targetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requireApproval": { + "type": "bool", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "updateTime": { @@ -1736,6 +2079,19 @@ } } }, + "TargetAttribute": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, "Release": { "options": { "(google.api.resource).type": "clouddeploy.googleapis.com/Release", @@ -1936,6 +2292,7 @@ "CLOUD_BUILD_UNAVAILABLE": 1, "EXECUTION_FAILED": 2, "CLOUD_BUILD_REQUEST_FAILED": 3, + "VERIFICATION_CONFIG_NOT_FOUND": 4, "CUSTOM_ACTION_NOT_FOUND": 5 } } @@ -2351,6 +2708,21 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "rollbackOfRollout": { + "type": "string", + "id": 26, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rolledBackByRollouts": { + "rule": "repeated", + "type": "string", + "id": 27, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2400,6 +2772,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "automation": { + "type": "AutomationRolloutMetadata", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2438,6 +2817,41 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "job": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "run.googleapis.com/Job" + } + } + } + }, + "AutomationRolloutMetadata": { + "fields": { + "promoteAutomationRun": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advanceAutomationRuns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "repairAutomationRuns": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -3482,89 +3896,1027 @@ } } }, - "SkaffoldSupportState": { - "values": { - "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED": 0, - "SKAFFOLD_SUPPORT_STATE_SUPPORTED": 1, - "SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE": 2, - "SKAFFOLD_SUPPORT_STATE_UNSUPPORTED": 3 - } - }, - "DeliveryPipelineNotificationEvent": { + "Automation": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/Automation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}", + "(google.api.resource).style": "DECLARATIVE_FRIENDLY" + }, "fields": { - "message": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "deliveryPipeline": { + "uid": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "type": { - "type": "Type", - "id": 3 - } - } - }, - "Type": { - "valuesOptions": { - "TYPE_RENDER_STATUES_CHANGE": { - "deprecated": true - } - }, - "values": { - "TYPE_UNSPECIFIED": 0, - "TYPE_PUBSUB_NOTIFICATION_FAILURE": 1, - "TYPE_RESOURCE_STATE_CHANGE": 3, - "TYPE_PROCESS_ABORTED": 4, - "TYPE_RESTRICTION_VIOLATED": 5, - "TYPE_RESOURCE_DELETED": 6, - "TYPE_ROLLOUT_UPDATE": 7, - "TYPE_RENDER_STATUES_CHANGE": 2 - } - }, - "JobRunNotificationEvent": { - "fields": { - "message": { + "description": { "type": "string", - "id": 1 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "jobRun": { - "type": "string", - "id": 2 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "pipelineUid": { - "type": "string", - "id": 3 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "releaseUid": { + "annotations": { + "keyType": "string", "type": "string", - "id": 4 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "rolloutUid": { + "labels": { + "keyType": "string", "type": "string", - "id": 5 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "targetId": { + "etag": { "type": "string", - "id": 6 + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "type": { - "type": "Type", - "id": 7 - } - } - }, - "ReleaseNotificationEvent": { - "fields": { - "message": { - "type": "string", - "id": 1 + "suspended": { + "type": "bool", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "release": { + "serviceAccount": { "type": "string", - "id": 2 - }, + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "selector": { + "type": "AutomationResourceSelector", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rules": { + "rule": "repeated", + "type": "AutomationRule", + "id": 14, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AutomationResourceSelector": { + "fields": { + "targets": { + "rule": "repeated", + "type": "TargetAttribute", + "id": 1 + } + } + }, + "AutomationRule": { + "oneofs": { + "rule": { + "oneof": [ + "promoteReleaseRule", + "advanceRolloutRule", + "repairRolloutRule" + ] + } + }, + "fields": { + "promoteReleaseRule": { + "type": "PromoteReleaseRule", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "advanceRolloutRule": { + "type": "AdvanceRolloutRule", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repairRolloutRule": { + "type": "RepairRolloutRule", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PromoteReleaseRule": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "destinationTargetId": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "condition": { + "type": "AutomationRuleCondition", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destinationPhase": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AdvanceRolloutRule": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourcePhases": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "condition": { + "type": "AutomationRuleCondition", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RepairRolloutRule": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourcePhases": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "jobs": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "repairModes": { + "rule": "repeated", + "type": "RepairMode", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "condition": { + "type": "AutomationRuleCondition", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RepairMode": { + "oneofs": { + "mode": { + "oneof": [ + "retry", + "rollback" + ] + } + }, + "fields": { + "retry": { + "type": "Retry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rollback": { + "type": "Rollback", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Retry": { + "fields": { + "attempts": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backoffMode": { + "type": "BackoffMode", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Rollback": { + "fields": { + "destinationPhase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AutomationRuleCondition": { + "fields": { + "targetsPresentCondition": { + "type": "TargetsPresentCondition", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateAutomationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/Automation" + } + }, + "automationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "automation": { + "type": "Automation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateAutomationRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "automation": { + "type": "Automation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteAutomationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Automation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAutomationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/Automation" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListAutomationsResponse": { + "fields": { + "automations": { + "rule": "repeated", + "type": "Automation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetAutomationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/Automation" + } + } + } + }, + "AutomationRun": { + "options": { + "(google.api.resource).type": "clouddeploy.googleapis.com/AutomationRun", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}" + }, + "oneofs": { + "operation": { + "oneof": [ + "promoteReleaseOperation", + "advanceRolloutOperation", + "repairRolloutOperation" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "automationSnapshot": { + "type": "Automation", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetId": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDescription": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ruleId": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "automationId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "promoteReleaseOperation": { + "type": "PromoteReleaseOperation", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advanceRolloutOperation": { + "type": "AdvanceRolloutOperation", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "repairRolloutOperation": { + "type": "RepairRolloutOperation", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "waitUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "CANCELLED": 2, + "FAILED": 3, + "IN_PROGRESS": 4, + "PENDING": 5 + } + } + } + }, + "PromoteReleaseOperation": { + "fields": { + "targetId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rollout": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "phase": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "AdvanceRolloutOperation": { + "fields": { + "sourcePhase": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rollout": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destinationPhase": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RepairRolloutOperation": { + "fields": { + "rollout": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "currentRepairModeIndex": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "repairPhases": { + "rule": "repeated", + "type": "RepairPhase", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RepairPhase": { + "oneofs": { + "repairPhase": { + "oneof": [ + "retry", + "rollback" + ] + } + }, + "fields": { + "retry": { + "type": "RetryPhase", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rollback": { + "type": "RollbackAttempt", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RetryPhase": { + "fields": { + "totalAttempts": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backoffMode": { + "type": "BackoffMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "phaseId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "jobId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "attempts": { + "rule": "repeated", + "type": "RetryAttempt", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RetryAttempt": { + "fields": { + "attempt": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "wait": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "RepairState", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDesc": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RollbackAttempt": { + "fields": { + "destinationPhase": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rolloutId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "RepairState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "stateDesc": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListAutomationRunsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "clouddeploy.googleapis.com/AutomationRun" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListAutomationRunsResponse": { + "fields": { + "automationRuns": { + "rule": "repeated", + "type": "AutomationRun", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetAutomationRunRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/AutomationRun" + } + } + } + }, + "CancelAutomationRunRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "clouddeploy.googleapis.com/AutomationRun" + } + } + } + }, + "CancelAutomationRunResponse": { + "fields": {} + }, + "SkaffoldSupportState": { + "values": { + "SKAFFOLD_SUPPORT_STATE_UNSPECIFIED": 0, + "SKAFFOLD_SUPPORT_STATE_SUPPORTED": 1, + "SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE": 2, + "SKAFFOLD_SUPPORT_STATE_UNSUPPORTED": 3 + } + }, + "BackoffMode": { + "values": { + "BACKOFF_MODE_UNSPECIFIED": 0, + "BACKOFF_MODE_LINEAR": 1, + "BACKOFF_MODE_EXPONENTIAL": 2 + } + }, + "RepairState": { + "values": { + "REPAIR_STATE_UNSPECIFIED": 0, + "REPAIR_STATE_SUCCEEDED": 1, + "REPAIR_STATE_CANCELLED": 2, + "REPAIR_STATE_FAILED": 3, + "REPAIR_STATE_IN_PROGRESS": 4, + "REPAIR_STATE_PENDING": 5, + "REPAIR_STATE_SKIPPED": 6 + } + }, + "DeliveryPipelineNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "deliveryPipeline": { + "type": "string", + "id": 2 + }, + "type": { + "type": "Type", + "id": 3 + } + } + }, + "JobRunNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "jobRun": { + "type": "string", + "id": 2 + }, + "pipelineUid": { + "type": "string", + "id": 3 + }, + "releaseUid": { + "type": "string", + "id": 4 + }, + "rolloutUid": { + "type": "string", + "id": 5 + }, + "targetId": { + "type": "string", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + } + } + }, + "ReleaseNotificationEvent": { + "fields": { + "message": { + "type": "string", + "id": 1 + }, + "release": { + "type": "string", + "id": 2 + }, "type": { "type": "Type", "id": 3 @@ -3580,6 +4932,10 @@ "release": { "type": "string", "id": 2 + }, + "releaseRenderState": { + "type": "Release.RenderState", + "id": 3 } } }, @@ -3611,6 +4967,58 @@ } } }, + "RolloutUpdateEvent": { + "fields": { + "pipelineUid": { + "type": "string", + "id": 1 + }, + "releaseUid": { + "type": "string", + "id": 2 + }, + "rollout": { + "type": "string", + "id": 3 + }, + "targetId": { + "type": "string", + "id": 4 + }, + "rolloutUpdateType": { + "type": "RolloutUpdateType", + "id": 5 + }, + "message": { + "type": "string", + "id": 6 + }, + "type": { + "type": "Type", + "id": 7 + } + }, + "nested": { + "RolloutUpdateType": { + "values": { + "ROLLOUT_UPDATE_TYPE_UNSPECIFIED": 0, + "PENDING": 1, + "PENDING_RELEASE": 2, + "IN_PROGRESS": 3, + "CANCELLING": 4, + "CANCELLED": 5, + "HALTED": 6, + "SUCCEEDED": 7, + "FAILED": 8, + "APPROVAL_REQUIRED": 9, + "APPROVED": 10, + "REJECTED": 11, + "ADVANCE_REQUIRED": 12, + "ADVANCED": 13 + } + } + } + }, "TargetNotificationEvent": { "fields": { "message": { diff --git a/packages/google-cloud-deploy/samples/README.md b/packages/google-cloud-deploy/samples/README.md index 7b0f0b37215..90dac0713d9 100644 --- a/packages/google-cloud-deploy/samples/README.md +++ b/packages/google-cloud-deploy/samples/README.md @@ -15,13 +15,18 @@ * [Cloud_deploy.abandon_release](#cloud_deploy.abandon_release) * [Cloud_deploy.advance_rollout](#cloud_deploy.advance_rollout) * [Cloud_deploy.approve_rollout](#cloud_deploy.approve_rollout) + * [Cloud_deploy.cancel_automation_run](#cloud_deploy.cancel_automation_run) * [Cloud_deploy.cancel_rollout](#cloud_deploy.cancel_rollout) + * [Cloud_deploy.create_automation](#cloud_deploy.create_automation) * [Cloud_deploy.create_delivery_pipeline](#cloud_deploy.create_delivery_pipeline) * [Cloud_deploy.create_release](#cloud_deploy.create_release) * [Cloud_deploy.create_rollout](#cloud_deploy.create_rollout) * [Cloud_deploy.create_target](#cloud_deploy.create_target) + * [Cloud_deploy.delete_automation](#cloud_deploy.delete_automation) * [Cloud_deploy.delete_delivery_pipeline](#cloud_deploy.delete_delivery_pipeline) * [Cloud_deploy.delete_target](#cloud_deploy.delete_target) + * [Cloud_deploy.get_automation](#cloud_deploy.get_automation) + * [Cloud_deploy.get_automation_run](#cloud_deploy.get_automation_run) * [Cloud_deploy.get_config](#cloud_deploy.get_config) * [Cloud_deploy.get_delivery_pipeline](#cloud_deploy.get_delivery_pipeline) * [Cloud_deploy.get_job_run](#cloud_deploy.get_job_run) @@ -29,13 +34,17 @@ * [Cloud_deploy.get_rollout](#cloud_deploy.get_rollout) * [Cloud_deploy.get_target](#cloud_deploy.get_target) * [Cloud_deploy.ignore_job](#cloud_deploy.ignore_job) + * [Cloud_deploy.list_automation_runs](#cloud_deploy.list_automation_runs) + * [Cloud_deploy.list_automations](#cloud_deploy.list_automations) * [Cloud_deploy.list_delivery_pipelines](#cloud_deploy.list_delivery_pipelines) * [Cloud_deploy.list_job_runs](#cloud_deploy.list_job_runs) * [Cloud_deploy.list_releases](#cloud_deploy.list_releases) * [Cloud_deploy.list_rollouts](#cloud_deploy.list_rollouts) * [Cloud_deploy.list_targets](#cloud_deploy.list_targets) * [Cloud_deploy.retry_job](#cloud_deploy.retry_job) + * [Cloud_deploy.rollback_target](#cloud_deploy.rollback_target) * [Cloud_deploy.terminate_job_run](#cloud_deploy.terminate_job_run) + * [Cloud_deploy.update_automation](#cloud_deploy.update_automation) * [Cloud_deploy.update_delivery_pipeline](#cloud_deploy.update_delivery_pipeline) * [Cloud_deploy.update_target](#cloud_deploy.update_target) * [Quickstart](#quickstart) @@ -106,6 +115,23 @@ __Usage:__ +### Cloud_deploy.cancel_automation_run + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js` + + +----- + + + + ### Cloud_deploy.cancel_rollout View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js). @@ -123,6 +149,23 @@ __Usage:__ +### Cloud_deploy.create_automation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js` + + +----- + + + + ### Cloud_deploy.create_delivery_pipeline View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js). @@ -191,6 +234,23 @@ __Usage:__ +### Cloud_deploy.delete_automation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js` + + +----- + + + + ### Cloud_deploy.delete_delivery_pipeline View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js). @@ -225,6 +285,40 @@ __Usage:__ +### Cloud_deploy.get_automation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js` + + +----- + + + + +### Cloud_deploy.get_automation_run + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js` + + +----- + + + + ### Cloud_deploy.get_config View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_config.js). @@ -344,6 +438,40 @@ __Usage:__ +### Cloud_deploy.list_automation_runs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js` + + +----- + + + + +### Cloud_deploy.list_automations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js` + + +----- + + + + ### Cloud_deploy.list_delivery_pipelines View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js). @@ -446,6 +574,23 @@ __Usage:__ +### Cloud_deploy.rollback_target + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js` + + +----- + + + + ### Cloud_deploy.terminate_job_run View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js). @@ -463,6 +608,23 @@ __Usage:__ +### Cloud_deploy.update_automation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js` + + +----- + + + + ### Cloud_deploy.update_delivery_pipeline View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_delivery_pipeline.js). diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js index 8c51dc1c727..cb791ed4624 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.abandon_release.js @@ -30,8 +30,7 @@ function main(name) { */ /** * Required. Name of the Release. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.advance_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.advance_rollout.js index 1a1045b0db4..fcb09cd794f 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.advance_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.advance_rollout.js @@ -30,8 +30,7 @@ function main(name, phaseId) { */ /** * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. */ // const name = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js index 9906ce6b801..fa9cefda477 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.approve_rollout.js @@ -30,8 +30,7 @@ function main(name, approved) { */ /** * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. */ // const name = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_automation_run.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.cancel_automation_run.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_automation_run.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js index 93d41dfe01c..508ca9e2c60 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.cancel_rollout.js @@ -30,8 +30,7 @@ function main(name) { */ /** * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. */ // const name = 'abc123' diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.create_automation.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_automation.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js index 6ee87e7ef82..bc35269a796 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_delivery_pipeline.js @@ -30,7 +30,8 @@ function main(parent, deliveryPipelineId, deliveryPipeline) { */ /** * Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be projects/{project_id}/locations/{location_name}. + * created. Format should be + * `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js index 6b4e6b70a91..029f3c779c3 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_release.js @@ -31,7 +31,7 @@ function main(parent, releaseId, release) { /** * Required. The parent collection in which the `Release` should be created. * Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js index 553c0874ea8..6a19b19f0e3 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_rollout.js @@ -31,7 +31,7 @@ function main(parent, rolloutId, rollout) { /** * Required. The parent collection in which the `Rollout` should be created. * Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js index 3b90d4dfae2..8b9301f42df 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.create_target.js @@ -31,7 +31,7 @@ function main(parent, targetId, target) { /** * Required. The parent collection in which the `Target` should be created. * Format should be - * projects/{project_id}/locations/{location_name}. + * `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.delete_automation.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_automation.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js index 54263564f15..393e2c5f5f0 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. The name of the `DeliveryPipeline` to delete. Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const name = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js index b0adc8e8863..ebe1b0cd306 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.delete_target.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. The name of the `Target` to delete. Format should be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. */ // const name = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation.js diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation_run.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.get_automation_run.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_automation_run.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js index 39985823a66..630419ae016 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_delivery_pipeline.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the `DeliveryPipeline`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js index 983b6cdc39c..ffb17d2e3d1 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_job_run.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the `JobRun`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js index 56edc52c365..b005ec93c94 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_release.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the `Release`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js index d7538f68bf5..37c79053a1c 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_rollout.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the `Rollout`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js index 9f6ded7d771..89aa9d69099 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.get_target.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the `Target`. Format must be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.ignore_job.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.ignore_job.js index 89901c2d225..293719eacfc 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.ignore_job.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.ignore_job.js @@ -30,8 +30,7 @@ function main(rollout, phaseId, jobId) { */ /** * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. */ // const rollout = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automation_runs.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automation_runs.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automation_runs.js diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automations.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.list_automations.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_automations.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js index 75466cc6926..1aa20694935 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_delivery_pipelines.js @@ -30,7 +30,7 @@ function main(parent) { */ /** * Required. The parent, which owns this collection of pipelines. Format must - * be projects/{project_id}/locations/{location_name}. + * be `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js index eb31e48f80a..e09c307fcfc 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.list_targets.js @@ -30,7 +30,7 @@ function main(parent) { */ /** * Required. The parent, which owns this collection of targets. Format must be - * projects/{project_id}/locations/{location_name}. + * `projects/{project_id}/locations/{location_name}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js index 76bbf945f31..c87a3d0d591 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.retry_job.js @@ -30,8 +30,7 @@ function main(rollout, phaseId, jobId) { */ /** * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. */ // const rollout = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.rollback_target.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.rollback_target.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.rollback_target.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js index b50029f342d..3158a5f54ac 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js +++ b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.terminate_job_run.js @@ -30,8 +30,7 @@ function main(name) { */ /** * Required. Name of the `JobRun`. Format must be - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. */ // const name = 'abc123' diff --git a/owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_automation.js b/packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js similarity index 100% rename from owl-bot-staging/google-cloud-deploy/v1/samples/generated/v1/cloud_deploy.update_automation.js rename to packages/google-cloud-deploy/samples/generated/v1/cloud_deploy.update_automation.js diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json index 1bbe3bf9c1c..bff0b1adec7 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 85, "type": "FULL" } ], @@ -335,6 +335,70 @@ } } }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async", + "title": "CloudDeploy rollbackTarget Sample", + "origin": "API_DEFINITION", + "description": " Creates a `Rollout` to roll back the specified target.", + "canonical": true, + "file": "cloud_deploy.rollback_target.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "target_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout_id", + "type": "TYPE_STRING" + }, + { + "name": "release_id", + "type": "TYPE_STRING" + }, + { + "name": "rollout_to_roll_back", + "type": "TYPE_STRING" + }, + { + "name": "rollback_config", + "type": ".google.cloud.deploy.v1.RollbackTargetConfig" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.deploy.v1.RollbackTargetResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "RollbackTarget", + "fullName": "google.cloud.deploy.v1.CloudDeploy.RollbackTarget", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, { "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetTarget_async", "title": "CloudDeploy getTarget Sample", @@ -706,7 +770,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], @@ -746,7 +810,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 59, "type": "FULL" } ], @@ -790,7 +854,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 59, "type": "FULL" } ], @@ -834,7 +898,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], @@ -1030,7 +1094,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 64, "type": "FULL" } ], @@ -1078,7 +1142,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 64, "type": "FULL" } ], @@ -1222,7 +1286,7 @@ "segments": [ { "start": 25, - "end": 55, + "end": 54, "type": "FULL" } ], @@ -1290,6 +1354,406 @@ } } } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async", + "title": "CloudDeploy createAutomation Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Automation in a given project and location.", + "canonical": true, + "file": "cloud_deploy.create_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "automation_id", + "type": "TYPE_STRING" + }, + { + "name": "automation", + "type": ".google.cloud.deploy.v1.Automation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CreateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CreateAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async", + "title": "CloudDeploy updateAutomation Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Automation resource.", + "canonical": true, + "file": "cloud_deploy.update_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "automation", + "type": ".google.cloud.deploy.v1.Automation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "UpdateAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.UpdateAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async", + "title": "CloudDeploy deleteAutomation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Automation resource.", + "canonical": true, + "file": "cloud_deploy.delete_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 86, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "DeleteAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.DeleteAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetAutomation_async", + "title": "CloudDeploy getAutomation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Automation.", + "canonical": true, + "file": "cloud_deploy.get_automation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.Automation", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetAutomation", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomation", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListAutomations_async", + "title": "CloudDeploy listAutomations Sample", + "origin": "API_DEFINITION", + "description": " Lists Automations in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_automations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAutomations", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListAutomationsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListAutomations", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomations", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async", + "title": "CloudDeploy getAutomationRun Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single AutomationRun.", + "canonical": true, + "file": "cloud_deploy.get_automation_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.AutomationRun", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "GetAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.GetAutomationRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async", + "title": "CloudDeploy listAutomationRuns Sample", + "origin": "API_DEFINITION", + "description": " Lists AutomationRuns in a given project and location.", + "canonical": true, + "file": "cloud_deploy.list_automation_runs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAutomationRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.ListAutomationRunsResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "ListAutomationRuns", + "fullName": "google.cloud.deploy.v1.CloudDeploy.ListAutomationRuns", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } + }, + { + "regionTag": "clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async", + "title": "CloudDeploy cancelAutomationRun Sample", + "origin": "API_DEFINITION", + "description": " Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun in a different state returns an `FAILED_PRECONDITION` error.", + "canonical": true, + "file": "cloud_deploy.cancel_automation_run.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.deploy.v1.CancelAutomationRunResponse", + "client": { + "shortName": "CloudDeployClient", + "fullName": "google.cloud.deploy.v1.CloudDeployClient" + }, + "method": { + "shortName": "CancelAutomationRun", + "fullName": "google.cloud.deploy.v1.CloudDeploy.CancelAutomationRun", + "service": { + "shortName": "CloudDeploy", + "fullName": "google.cloud.deploy.v1.CloudDeploy" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts index 3b791eae47f..ca6c52bcf91 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client.ts @@ -193,6 +193,12 @@ export class CloudDeployClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + automationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}' + ), + automationRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}' + ), buildPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/builds/{build}' ), @@ -205,6 +211,9 @@ export class CloudDeployClient { deliveryPipelinePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}' ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobs/{job}' + ), jobRunPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}' ), @@ -263,6 +272,16 @@ export class CloudDeployClient { 'nextPageToken', 'jobRuns' ), + listAutomations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'automations' + ), + listAutomationRuns: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'automationRuns' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -385,6 +404,24 @@ export class CloudDeployClient { const createRolloutMetadata = protoFilesRoot.lookup( '.google.cloud.deploy.v1.OperationMetadata' ) as gax.protobuf.Type; + const createAutomationResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Automation' + ) as gax.protobuf.Type; + const createAutomationMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateAutomationResponse = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.Automation' + ) as gax.protobuf.Type; + const updateAutomationMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteAutomationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteAutomationMetadata = protoFilesRoot.lookup( + '.google.cloud.deploy.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createDeliveryPipeline: new this._gaxModule.LongrunningDescriptor( @@ -439,6 +476,21 @@ export class CloudDeployClient { createRolloutResponse.decode.bind(createRolloutResponse), createRolloutMetadata.decode.bind(createRolloutMetadata) ), + createAutomation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAutomationResponse.decode.bind(createAutomationResponse), + createAutomationMetadata.decode.bind(createAutomationMetadata) + ), + updateAutomation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAutomationResponse.decode.bind(updateAutomationResponse), + updateAutomationMetadata.decode.bind(updateAutomationMetadata) + ), + deleteAutomation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAutomationResponse.decode.bind(deleteAutomationResponse), + deleteAutomationMetadata.decode.bind(deleteAutomationMetadata) + ), }; // Put together the default options sent with requests. @@ -497,6 +549,7 @@ export class CloudDeployClient { 'updateDeliveryPipeline', 'deleteDeliveryPipeline', 'listTargets', + 'rollbackTarget', 'getTarget', 'createTarget', 'updateTarget', @@ -517,6 +570,14 @@ export class CloudDeployClient { 'getJobRun', 'terminateJobRun', 'getConfig', + 'createAutomation', + 'updateAutomation', + 'deleteAutomation', + 'getAutomation', + 'listAutomations', + 'getAutomationRun', + 'listAutomationRuns', + 'cancelAutomationRun', ]; for (const methodName of cloudDeployStubMethods) { const callPromise = this.cloudDeployStub.then( @@ -610,7 +671,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the `DeliveryPipeline`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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. @@ -694,6 +755,108 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getDeliveryPipeline(request, options, callback); } + /** + * Creates a `Rollout` to roll back the specified target. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} request.targetId + * Required. ID of the `Target` that is being rolled back. + * @param {string} request.rolloutId + * Required. ID of the rollback `Rollout` to create. + * @param {string} [request.releaseId] + * Optional. ID of the `Release` to roll back to. If this isn't specified, the + * previous successful `Rollout` to the specified target will be used to + * determine the `Release`. + * @param {string} [request.rolloutToRollBack] + * Optional. If provided, this must be the latest `Rollout` that is on the + * `Target`. + * @param {google.cloud.deploy.v1.RollbackTargetConfig} [request.rollbackConfig] + * Optional. Configs for the rollback `Rollout`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with a `RollbackTargetResponse`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.RollbackTargetResponse|RollbackTargetResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.rollback_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async + */ + rollbackTarget( + request?: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest | undefined, + {} | undefined, + ] + >; + rollbackTarget( + request: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest | null | undefined, + {} | null | undefined + > + ): void; + rollbackTarget( + request: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + callback: Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest | null | undefined, + {} | null | undefined + > + ): void; + rollbackTarget( + request?: protos.google.cloud.deploy.v1.IRollbackTargetRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + | protos.google.cloud.deploy.v1.IRollbackTargetRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IRollbackTargetResponse, + protos.google.cloud.deploy.v1.IRollbackTargetRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.rollbackTarget(request, options, callback); + } /** * Gets details of a single Target. * @@ -701,7 +864,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the `Target`. Format must be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_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. @@ -784,7 +947,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the `Release`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_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. @@ -867,8 +1030,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the Release. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -953,8 +1115,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param {boolean} request.approved * Required. True = approve; false = reject * @param {object} [options] @@ -1041,8 +1202,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param {string} request.phaseId * Required. The phase ID to advance the `Rollout` to. * @param {object} [options] @@ -1129,8 +1289,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1215,7 +1374,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the `Rollout`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_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. @@ -1298,8 +1457,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.rollout * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param {string} request.phaseId * Required. The phase ID the Job to ignore belongs to. * @param {string} request.jobId @@ -1386,8 +1544,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.rollout * Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param {string} request.phaseId * Required. The phase ID the Job to retry belongs to. * @param {string} request.jobId @@ -1474,7 +1631,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the `JobRun`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_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. @@ -1557,8 +1714,7 @@ export class CloudDeployClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the `JobRun`. Format must be - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1718,110 +1874,70 @@ export class CloudDeployClient { this.initialize(); return this.innerApiCalls.getConfig(request, options, callback); } - /** - * Creates a new DeliveryPipeline in a given project and location. + * Gets details of a single Automation. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be projects/{project_id}/locations/{location_name}. - * @param {string} request.deliveryPipelineId - * Required. ID of the `DeliveryPipeline`. - * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline - * Required. The `DeliveryPipeline` to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. + * @param {string} request.name + * Required. Name of the `Automation`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.Automation|Automation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async + * @example include:samples/generated/v1/cloud_deploy.get_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetAutomation_async */ - createDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + getAutomation( + request?: protos.google.cloud.deploy.v1.IGetAutomationRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest | undefined, {} | undefined, ] >; - createDeliveryPipeline( - request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + getAutomation( + request: protos.google.cloud.deploy.v1.IGetAutomationRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest | null | undefined, {} | null | undefined > ): void; - createDeliveryPipeline( - request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + getAutomation( + request: protos.google.cloud.deploy.v1.IGetAutomationRequest, callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest | null | undefined, {} | null | undefined > ): void; - createDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, + getAutomation( + request?: protos.google.cloud.deploy.v1.IGetAutomationRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomation, + | protos.google.cloud.deploy.v1.IGetAutomationRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IGetAutomationRequest | undefined, {} | undefined, ] > | void { @@ -1838,156 +1954,75 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createDeliveryPipeline( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by `createDeliveryPipeline()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async - */ - async checkCreateDeliveryPipelineProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.deploy.v1.DeliveryPipeline, - protos.google.cloud.deploy.v1.OperationMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.createDeliveryPipeline, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.DeliveryPipeline, - protos.google.cloud.deploy.v1.OperationMetadata - >; + return this.innerApiCalls.getAutomation(request, options, callback); } /** - * Updates the parameters of a single DeliveryPipeline. + * Gets details of a single AutomationRun. * * @param {Object} request * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * `DeliveryPipeline` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline - * Required. The `DeliveryPipeline` to update. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, updating a `DeliveryPipeline` that does not exist - * will result in the creation of a new `DeliveryPipeline`. - * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. + * @param {string} request.name + * Required. Name of the `AutomationRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async + * @example include:samples/generated/v1/cloud_deploy.get_automation_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async */ - updateDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + getAutomationRun( + request?: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest | undefined, {} | undefined, ] >; - updateDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + getAutomationRun( + request: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest | null | undefined, {} | null | undefined > ): void; - updateDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + getAutomationRun( + request: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, callback: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest | null | undefined, {} | null | undefined > ): void; - updateDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, + getAutomationRun( + request?: protos.google.cloud.deploy.v1.IGetAutomationRunRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomationRun, + | protos.google.cloud.deploy.v1.IGetAutomationRunRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.deploy.v1.IAutomationRun, + protos.google.cloud.deploy.v1.IGetAutomationRunRequest | undefined, {} | undefined, ] > | void { @@ -2004,62 +2039,124 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'delivery_pipeline.name': request.deliveryPipeline!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateDeliveryPipeline( - request, - options, - callback - ); + return this.innerApiCalls.getAutomationRun(request, options, callback); } /** - * Check the status of the long running operation returned by `updateDeliveryPipeline()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * Cancels an AutomationRun. The `state` of the `AutomationRun` after + * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on + * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun + * in a different state returns an `FAILED_PRECONDITION` error. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the `AutomationRun`. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.deploy.v1.CancelAutomationRunResponse|CancelAutomationRunResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async + * @example include:samples/generated/v1/cloud_deploy.cancel_automation_run.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async */ - async checkUpdateDeliveryPipelineProgress( - name: string + cancelAutomationRun( + request?: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.cloud.deploy.v1.DeliveryPipeline, - protos.google.cloud.deploy.v1.OperationMetadata + [ + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest | undefined, + {} | undefined, + ] + >; + cancelAutomationRun( + request: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + | protos.google.cloud.deploy.v1.ICancelAutomationRunRequest + | null + | undefined, + {} | null | undefined > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.updateDeliveryPipeline, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.DeliveryPipeline, - protos.google.cloud.deploy.v1.OperationMetadata - >; + ): void; + cancelAutomationRun( + request: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + callback: Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + | protos.google.cloud.deploy.v1.ICancelAutomationRunRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelAutomationRun( + request?: protos.google.cloud.deploy.v1.ICancelAutomationRunRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + | protos.google.cloud.deploy.v1.ICancelAutomationRunRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + | protos.google.cloud.deploy.v1.ICancelAutomationRunRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.deploy.v1.ICancelAutomationRunResponse, + protos.google.cloud.deploy.v1.ICancelAutomationRunRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelAutomationRun(request, options, callback); } + /** - * Deletes a single DeliveryPipeline. + * Creates a new DeliveryPipeline in a given project and location. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `DeliveryPipeline` to delete. Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * @param {string} request.parent + * Required. The parent collection in which the `DeliveryPipeline` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}`. + * @param {string} request.deliveryPipelineId + * Required. ID of the `DeliveryPipeline`. + * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline + * Required. The `DeliveryPipeline` to create. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. + * that for at least 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, @@ -2069,20 +2166,9 @@ export class CloudDeployClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, then deleting an already deleted or non-existing - * `DeliveryPipeline` will succeed. * @param {boolean} [request.validateOnly] - * Optional. If set, validate the request and preview the review, but do not - * actually post it. - * @param {boolean} [request.force] - * Optional. If set to true, all child resources under this pipeline will also - * be deleted. Otherwise, the request will only work if the pipeline has no - * child resources. - * @param {string} [request.etag] - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2091,52 +2177,52 @@ export class CloudDeployClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async + * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async */ - deleteDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - deleteDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteDeliveryPipeline( - request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + createDeliveryPipeline( + request: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteDeliveryPipeline( - request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, + createDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.ICreateDeliveryPipelineRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2144,7 +2230,7 @@ export class CloudDeployClient { >, callback?: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2153,7 +2239,7 @@ export class CloudDeployClient { ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2173,31 +2259,31 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.deleteDeliveryPipeline( + return this.innerApiCalls.createDeliveryPipeline( request, options, callback ); } /** - * Check the status of the long running operation returned by `deleteDeliveryPipeline()`. + * Check the status of the long running operation returned by `createDeliveryPipeline()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async + * @example include:samples/generated/v1/cloud_deploy.create_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateDeliveryPipeline_async */ - async checkDeleteDeliveryPipelineProgress( + async checkCreateDeliveryPipelineProgress( name: string ): Promise< LROperation< - protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.DeliveryPipeline, protos.google.cloud.deploy.v1.OperationMetadata > > { @@ -2208,27 +2294,27 @@ export class CloudDeployClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.deleteDeliveryPipeline, + this.descriptors.longrunning.createDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.DeliveryPipeline, protos.google.cloud.deploy.v1.OperationMetadata >; } /** - * Creates a new Target in a given project and location. + * Updates the parameters of a single DeliveryPipeline. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Target` should be created. - * Format should be - * projects/{project_id}/locations/{location_name}. - * @param {string} request.targetId - * Required. ID of the `Target`. - * @param {google.cloud.deploy.v1.Target} request.target - * Required. The `Target` to create. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * `DeliveryPipeline` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.DeliveryPipeline} request.deliveryPipeline + * Required. The `DeliveryPipeline` to update. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -2243,6 +2329,9 @@ export class CloudDeployClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `DeliveryPipeline` that does not exist + * will result in the creation of a new `DeliveryPipeline`. * @param {boolean} [request.validateOnly] * Optional. If set to true, the request is validated and the user is provided * with an expected result, but no actual change is made. @@ -2254,52 +2343,52 @@ export class CloudDeployClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async + * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async */ - createTarget( - request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - createTarget( - request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createTarget( - request: protos.google.cloud.deploy.v1.ICreateTargetRequest, + updateDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createTarget( - request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, + updateDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IUpdateDeliveryPipelineRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2307,7 +2396,7 @@ export class CloudDeployClient { >, callback?: Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2316,7 +2405,7 @@ export class CloudDeployClient { ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2336,27 +2425,31 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'delivery_pipeline.name': request.deliveryPipeline!.name ?? '', }); this.initialize(); - return this.innerApiCalls.createTarget(request, options, callback); + return this.innerApiCalls.updateDeliveryPipeline( + request, + options, + callback + ); } /** - * Check the status of the long running operation returned by `createTarget()`. + * Check the status of the long running operation returned by `updateDeliveryPipeline()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async + * @example include:samples/generated/v1/cloud_deploy.update_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateDeliveryPipeline_async */ - async checkCreateTargetProgress( + async checkUpdateDeliveryPipelineProgress( name: string ): Promise< LROperation< - protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.DeliveryPipeline, protos.google.cloud.deploy.v1.OperationMetadata > > { @@ -2367,32 +2460,27 @@ export class CloudDeployClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.createTarget, + this.descriptors.longrunning.updateDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.Target, + protos.google.cloud.deploy.v1.DeliveryPipeline, protos.google.cloud.deploy.v1.OperationMetadata >; } /** - * Updates the parameters of a single Target. + * Deletes a single DeliveryPipeline. * * @param {Object} request * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * Target resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @param {google.cloud.deploy.v1.Target} request.target - * Required. The `Target` to update. + * @param {string} request.name + * Required. The name of the `DeliveryPipeline` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. + * that for at least 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, @@ -2403,11 +2491,19 @@ export class CloudDeployClient { * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * @param {boolean} [request.allowMissing] - * Optional. If set to true, updating a `Target` that does not exist will - * result in the creation of a new `Target`. + * Optional. If set to true, then deleting an already deleted or non-existing + * `DeliveryPipeline` will succeed. * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. + * Optional. If set, validate the request and preview the review, but do not + * actually post it. + * @param {boolean} [request.force] + * Optional. If set to true, all child resources under this pipeline will also + * be deleted. Otherwise, the request will only work if the pipeline has no + * child resources. + * @param {string} [request.etag] + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2416,52 +2512,52 @@ export class CloudDeployClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async + * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async */ - updateTarget( - request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - updateTarget( - request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateTarget( - request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + deleteDeliveryPipeline( + request: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateTarget( - request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, + deleteDeliveryPipeline( + request?: protos.google.cloud.deploy.v1.IDeleteDeliveryPipelineRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2469,7 +2565,7 @@ export class CloudDeployClient { >, callback?: Callback< LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2478,7 +2574,7 @@ export class CloudDeployClient { ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2498,27 +2594,31 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'target.name': request.target!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateTarget(request, options, callback); + return this.innerApiCalls.deleteDeliveryPipeline( + request, + options, + callback + ); } /** - * Check the status of the long running operation returned by `updateTarget()`. + * Check the status of the long running operation returned by `deleteDeliveryPipeline()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.update_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async + * @example include:samples/generated/v1/cloud_deploy.delete_delivery_pipeline.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteDeliveryPipeline_async */ - async checkUpdateTargetProgress( + async checkDeleteDeliveryPipelineProgress( name: string ): Promise< LROperation< - protos.google.cloud.deploy.v1.Target, + protos.google.protobuf.Empty, protos.google.cloud.deploy.v1.OperationMetadata > > { @@ -2529,27 +2629,32 @@ export class CloudDeployClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.updateTarget, + this.descriptors.longrunning.deleteDeliveryPipeline, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.Target, + protos.google.protobuf.Empty, protos.google.cloud.deploy.v1.OperationMetadata >; } /** - * Deletes a single Target. + * Creates a new Target in a given project and location. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `Target` to delete. Format should be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * @param {string} request.parent + * Required. The parent collection in which the `Target` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}`. + * @param {string} request.targetId + * Required. ID of the `Target`. + * @param {google.cloud.deploy.v1.Target} request.target + * Required. The `Target` to create. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. + * that for at least 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, @@ -2559,16 +2664,9 @@ export class CloudDeployClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.allowMissing] - * Optional. If set to true, then deleting an already deleted or non-existing - * `Target` will succeed. * @param {boolean} [request.validateOnly] - * Optional. If set, validate the request and preview the review, but do not - * actually post it. - * @param {string} [request.etag] - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2577,52 +2675,52 @@ export class CloudDeployClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async + * @example include:samples/generated/v1/cloud_deploy.create_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async */ - deleteTarget( - request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - deleteTarget( - request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteTarget( - request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + createTarget( + request: protos.google.cloud.deploy.v1.ICreateTargetRequest, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteTarget( - request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, + createTarget( + request?: protos.google.cloud.deploy.v1.ICreateTargetRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2630,7 +2728,7 @@ export class CloudDeployClient { >, callback?: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2639,7 +2737,7 @@ export class CloudDeployClient { ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2659,27 +2757,27 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.deleteTarget(request, options, callback); + return this.innerApiCalls.createTarget(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteTarget()`. + * Check the status of the long running operation returned by `createTarget()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.delete_target.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async + * @example include:samples/generated/v1/cloud_deploy.create_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateTarget_async */ - async checkDeleteTargetProgress( + async checkCreateTargetProgress( name: string ): Promise< LROperation< - protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.Target, protos.google.cloud.deploy.v1.OperationMetadata > > { @@ -2690,27 +2788,27 @@ export class CloudDeployClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.deleteTarget, + this.descriptors.longrunning.createTarget, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.Target, protos.google.cloud.deploy.v1.OperationMetadata >; } /** - * Creates a new Release in a given project and location. + * Updates the parameters of a single Target. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Release` should be created. - * Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. - * @param {string} request.releaseId - * Required. ID of the `Release`. - * @param {google.cloud.deploy.v1.Release} request.release - * Required. The `Release` to create. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Target resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.Target} request.target + * Required. The `Target` to update. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore @@ -2725,6 +2823,9 @@ export class CloudDeployClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `Target` that does not exist will + * result in the creation of a new `Target`. * @param {boolean} [request.validateOnly] * Optional. If set to true, the request is validated and the user is provided * with an expected result, but no actual change is made. @@ -2736,52 +2837,52 @@ export class CloudDeployClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_release.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async + * @example include:samples/generated/v1/cloud_deploy.update_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async */ - createRelease( - request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - createRelease( - request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createRelease( - request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + updateTarget( + request: protos.google.cloud.deploy.v1.IUpdateTargetRequest, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createRelease( - request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + updateTarget( + request?: protos.google.cloud.deploy.v1.IUpdateTargetRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2789,7 +2890,7 @@ export class CloudDeployClient { >, callback?: Callback< LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2798,7 +2899,7 @@ export class CloudDeployClient { ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2818,27 +2919,27 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'target.name': request.target!.name ?? '', }); this.initialize(); - return this.innerApiCalls.createRelease(request, options, callback); + return this.innerApiCalls.updateTarget(request, options, callback); } /** - * Check the status of the long running operation returned by `createRelease()`. + * Check the status of the long running operation returned by `updateTarget()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_release.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async + * @example include:samples/generated/v1/cloud_deploy.update_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateTarget_async */ - async checkCreateReleaseProgress( + async checkUpdateTargetProgress( name: string ): Promise< LROperation< - protos.google.cloud.deploy.v1.Release, + protos.google.cloud.deploy.v1.Target, protos.google.cloud.deploy.v1.OperationMetadata > > { @@ -2849,32 +2950,27 @@ export class CloudDeployClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.createRelease, + this.descriptors.longrunning.updateTarget, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.Release, + protos.google.cloud.deploy.v1.Target, protos.google.cloud.deploy.v1.OperationMetadata >; } /** - * Creates a new Rollout in a given project and location. + * Deletes a single Target. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which the `Rollout` should be created. - * Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. - * @param {string} request.rolloutId - * Required. ID of the `Rollout`. - * @param {google.cloud.deploy.v1.Rollout} request.rollout - * Required. The `Rollout` to create. + * @param {string} request.name + * Required. The name of the `Target` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. + * that for at least 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, @@ -2884,12 +2980,16 @@ export class CloudDeployClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * `Target` will succeed. * @param {boolean} [request.validateOnly] - * Optional. If set to true, the request is validated and the user is provided - * with an expected result, but no actual change is made. - * @param {string} [request.startingPhaseId] - * Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` - * will start at the first phase. + * Optional. If set, validate the request and preview the review, but do not + * actually post it. + * @param {string} [request.etag] + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2898,52 +2998,52 @@ export class CloudDeployClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async + * @example include:samples/generated/v1/cloud_deploy.delete_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async */ - createRollout( - request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - createRollout( - request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createRollout( - request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + deleteTarget( + request: protos.google.cloud.deploy.v1.IDeleteTargetRequest, callback: Callback< LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createRollout( - request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + deleteTarget( + request?: protos.google.cloud.deploy.v1.IDeleteTargetRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2951,7 +3051,7 @@ export class CloudDeployClient { >, callback?: Callback< LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2960,7 +3060,7 @@ export class CloudDeployClient { ): Promise< [ LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2980,27 +3080,27 @@ export class CloudDeployClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createRollout(request, options, callback); + return this.innerApiCalls.deleteTarget(request, options, callback); } /** - * Check the status of the long running operation returned by `createRollout()`. + * Check the status of the long running operation returned by `deleteTarget()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.create_rollout.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async + * @example include:samples/generated/v1/cloud_deploy.delete_target.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteTarget_async */ - async checkCreateRolloutProgress( + async checkDeleteTargetProgress( name: string ): Promise< LROperation< - protos.google.cloud.deploy.v1.Rollout, + protos.google.protobuf.Empty, protos.google.cloud.deploy.v1.OperationMetadata > > { @@ -3011,104 +3111,1348 @@ export class CloudDeployClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.createRollout, + this.descriptors.longrunning.deleteTarget, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.deploy.v1.Rollout, + protos.google.protobuf.Empty, protos.google.cloud.deploy.v1.OperationMetadata >; } /** - * Lists DeliveryPipelines in a given project and location. + * Creates a new Release in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of pipelines. Format must - * be projects/{project_id}/locations/{location_name}. - * @param {number} request.pageSize - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListDeliveryPipelines` call. - * Provide this to retrieve the subsequent page. + * Required. The parent collection in which the `Release` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} request.releaseId + * Required. ID of the `Release`. + * @param {google.cloud.deploy.v1.Release} request.release + * Required. The `Release` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. * - * When paginating, all other provided parameters match - * the call that provided the page token. - * @param {string} request.filter - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - * @param {string} request.orderBy - * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. - * 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 `listDeliveryPipelinesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async */ - listDeliveryPipelines( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.deploy.v1.IDeliveryPipeline[], - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse, + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, ] >; - listDeliveryPipelines( - request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - | null - | undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listDeliveryPipelines( - request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - | null - | undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline + createRelease( + request: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; - listDeliveryPipelines( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + createRelease( + request?: protos.google.cloud.deploy.v1.ICreateReleaseRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRelease(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createRelease()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_release.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRelease_async + */ + async checkCreateReleaseProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Release, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createRelease, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Release, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + /** + * Creates a new Rollout in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Rollout` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. + * @param {string} request.rolloutId + * Required. ID of the `Rollout`. + * @param {google.cloud.deploy.v1.Rollout} request.rollout + * Required. The `Rollout` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {string} [request.startingPhaseId] + * Optional. The starting phase ID for the `Rollout`. If empty the `Rollout` + * will start at the first phase. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async + */ + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRollout( + request: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createRollout( + request?: protos.google.cloud.deploy.v1.ICreateRolloutRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createRollout(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createRollout()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_rollout.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateRollout_async + */ + async checkCreateRolloutProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Rollout, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createRollout, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Rollout, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + /** + * Creates a new Automation in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which the `Automation` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {string} request.automationId + * Required. ID of the `Automation`. + * @param {google.cloud.deploy.v1.Automation} request.automation + * Required. The `Automation` to create. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async + */ + createAutomation( + request?: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createAutomation( + request: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAutomation( + request: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAutomation( + request?: protos.google.cloud.deploy.v1.ICreateAutomationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAutomation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAutomation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.create_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async + */ + async checkCreateAutomationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Automation, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAutomation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Automation, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + /** + * Updates the parameters of a single Automation resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Automation` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.deploy.v1.Automation} request.automation + * Required. The `Automation` to update. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, updating a `Automation` that does not exist will + * result in the creation of a new `Automation`. + * @param {boolean} [request.validateOnly] + * Optional. If set to true, the request is validated and the user is provided + * with an expected result, but no actual change is made. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async + */ + updateAutomation( + request?: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateAutomation( + request: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAutomation( + request: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + callback: Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateAutomation( + request?: protos.google.cloud.deploy.v1.IUpdateAutomationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'automation.name': request.automation!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAutomation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateAutomation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.update_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async + */ + async checkUpdateAutomationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.deploy.v1.Automation, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateAutomation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.deploy.v1.Automation, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + /** + * Deletes a single Automation resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `Automation` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. If set to true, then deleting an already deleted or non-existing + * `Automation` will succeed. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and verify whether the resource + * exists, but do not actually post it. + * @param {string} [request.etag] + * Optional. The weak etag of the request. + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async + */ + deleteAutomation( + request?: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteAutomation( + request: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAutomation( + request: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteAutomation( + request?: protos.google.cloud.deploy.v1.IDeleteAutomationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAutomation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteAutomation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.delete_automation.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async + */ + async checkDeleteAutomationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteAutomation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.deploy.v1.OperationMetadata + >; + } + /** + * Lists DeliveryPipelines in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. + * 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 `listDeliveryPipelinesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse, + ] + >; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): void; + listDeliveryPipelines( + request: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): void; + listDeliveryPipelines( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IDeliveryPipeline + > + ): Promise< + [ + protos.google.cloud.deploy.v1.IDeliveryPipeline[], + protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, + protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDeliveryPipelines(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline} 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 `listDeliveryPipelinesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeliveryPipelinesStream( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDeliveryPipelines.createStream( + this.innerApiCalls.listDeliveryPipelines as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDeliveryPipelines`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of pipelines. Format must + * be `projects/{project_id}/locations/{location_name}`. + * @param {number} request.pageSize + * The maximum number of pipelines to return. The service may return + * fewer than this value. If unspecified, at most 50 pipelines will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListDeliveryPipelines` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter pipelines to be returned. See https://google.aip.dev/160 for more + * details. + * @param {string} request.orderBy + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_delivery_pipelines.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async + */ + listDeliveryPipelinesAsync( + request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDeliveryPipelines.asyncIterate( + this.innerApiCalls['listDeliveryPipelines'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Targets in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Target|Target}. + * 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 `listTargetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest | null, + protos.google.cloud.deploy.v1.IListTargetsResponse, + ] + >; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): void; + listTargets( + request: protos.google.cloud.deploy.v1.IListTargetsRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): void; + listTargets( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + >, + callback?: PaginationCallback< + protos.google.cloud.deploy.v1.IListTargetsRequest, + protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, + protos.google.cloud.deploy.v1.ITarget + > + ): Promise< + [ + protos.google.cloud.deploy.v1.ITarget[], + protos.google.cloud.deploy.v1.IListTargetsRequest | null, + protos.google.cloud.deploy.v1.IListTargetsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listTargets(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Target|Target} 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 `listTargetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTargetsStream( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTargets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTargets.createStream( + this.innerApiCalls.listTargets as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listTargets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent, which owns this collection of targets. Format must be + * `projects/{project_id}/locations/{location_name}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Target` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `Target` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter targets to be returned. See https://google.aip.dev/160 for + * more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.deploy.v1.Target|Target}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/cloud_deploy.list_targets.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListTargets_async + */ + listTargetsAsync( + request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTargets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTargets.asyncIterate( + this.innerApiCalls['listTargets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Releases in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `DeliveryPipeline` which owns this collection of `Release` + * objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Release|Release}. + * 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 `listReleasesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest | null, + protos.google.cloud.deploy.v1.IListReleasesResponse, + ] + >; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): void; + listReleases( + request: protos.google.cloud.deploy.v1.IListReleasesRequest, + callback: PaginationCallback< + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease + > + ): void; + listReleases( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse + protos.google.cloud.deploy.v1.IListReleasesRequest, + | protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline + protos.google.cloud.deploy.v1.IRelease >, callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, - | protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse - | null - | undefined, - protos.google.cloud.deploy.v1.IDeliveryPipeline + protos.google.cloud.deploy.v1.IListReleasesRequest, + protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, + protos.google.cloud.deploy.v1.IRelease > ): Promise< [ - protos.google.cloud.deploy.v1.IDeliveryPipeline[], - protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest | null, - protos.google.cloud.deploy.v1.IListDeliveryPipelinesResponse, + protos.google.cloud.deploy.v1.IRelease[], + protos.google.cloud.deploy.v1.IListReleasesRequest | null, + protos.google.cloud.deploy.v1.IListReleasesResponse, ] > | void { request = request || {}; @@ -3127,7 +4471,7 @@ export class CloudDeployClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDeliveryPipelines(request, options, callback); + return this.innerApiCalls.listReleases(request, options, callback); } /** @@ -3135,37 +4479,38 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of pipelines. Format must - * be projects/{project_id}/locations/{location_name}. - * @param {number} request.pageSize - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListDeliveryPipelines` call. + * Required. The `DeliveryPipeline` which owns this collection of `Release` + * objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. - * @param {string} request.filter - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - * @param {string} request.orderBy - * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {string} [request.filter] + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Release|Release} 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 `listDeliveryPipelinesAsync()` + * We recommend using `listReleasesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listDeliveryPipelinesStream( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + listReleasesStream( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3176,57 +4521,58 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDeliveryPipelines.createStream( - this.innerApiCalls.listDeliveryPipelines as GaxCall, + return this.descriptors.page.listReleases.createStream( + this.innerApiCalls.listReleases as GaxCall, request, callSettings ); } /** - * Equivalent to `listDeliveryPipelines`, but returns an iterable object. + * Equivalent to `listReleases`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of pipelines. Format must - * be projects/{project_id}/locations/{location_name}. - * @param {number} request.pageSize - * The maximum number of pipelines to return. The service may return - * fewer than this value. If unspecified, at most 50 pipelines will - * be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListDeliveryPipelines` call. + * Required. The `DeliveryPipeline` which owns this collection of `Release` + * objects. + * @param {number} [request.pageSize] + * Optional. The maximum number of `Release` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Release` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListReleases` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. - * @param {string} request.filter - * Filter pipelines to be returned. See https://google.aip.dev/160 for more - * details. - * @param {string} request.orderBy - * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @param {string} [request.filter] + * Optional. Filter releases to be returned. See https://google.aip.dev/160 + * for more details. + * @param {string} [request.orderBy] + * Optional. Field to sort by. See https://google.aip.dev/132#ordering for + * more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.DeliveryPipeline|DeliveryPipeline}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.deploy.v1.Release|Release}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_delivery_pipelines.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListDeliveryPipelines_async + * @example include:samples/generated/v1/cloud_deploy.list_releases.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListReleases_async */ - listDeliveryPipelinesAsync( - request?: protos.google.cloud.deploy.v1.IListDeliveryPipelinesRequest, + listReleasesAsync( + request?: protos.google.cloud.deploy.v1.IListReleasesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3235,98 +4581,99 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listDeliveryPipelines']; + const defaultCallSettings = this._defaults['listReleases']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDeliveryPipelines.asyncIterate( - this.innerApiCalls['listDeliveryPipelines'] as GaxCall, + return this.descriptors.page.listReleases.asyncIterate( + this.innerApiCalls['listReleases'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Targets in a given project and location. + * Lists Rollouts in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of targets. Format must be - * projects/{project_id}/locations/{location_name}. + * Required. The `Release` which owns this collection of `Rollout` objects. * @param {number} [request.pageSize] - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListTargets` call. + * Optional. A page token, received from a previous `ListRollouts` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Target|Target}. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. * 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 `listTargetsAsync()` + * We recommend using `listRolloutsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listTargets( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.deploy.v1.ITarget[], - protos.google.cloud.deploy.v1.IListTargetsRequest | null, - protos.google.cloud.deploy.v1.IListTargetsResponse, + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest | null, + protos.google.cloud.deploy.v1.IListRolloutsResponse, ] >; - listTargets( - request: protos.google.cloud.deploy.v1.IListTargetsRequest, + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, - protos.google.cloud.deploy.v1.ITarget + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout > ): void; - listTargets( - request: protos.google.cloud.deploy.v1.IListTargetsRequest, + listRollouts( + request: protos.google.cloud.deploy.v1.IListRolloutsRequest, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, - protos.google.cloud.deploy.v1.ITarget + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout > ): void; - listTargets( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + listRollouts( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, - protos.google.cloud.deploy.v1.ITarget + protos.google.cloud.deploy.v1.IListRolloutsRequest, + | protos.google.cloud.deploy.v1.IListRolloutsResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IRollout >, callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListTargetsRequest, - protos.google.cloud.deploy.v1.IListTargetsResponse | null | undefined, - protos.google.cloud.deploy.v1.ITarget + protos.google.cloud.deploy.v1.IListRolloutsRequest, + protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, + protos.google.cloud.deploy.v1.IRollout > ): Promise< [ - protos.google.cloud.deploy.v1.ITarget[], - protos.google.cloud.deploy.v1.IListTargetsRequest | null, - protos.google.cloud.deploy.v1.IListTargetsResponse, + protos.google.cloud.deploy.v1.IRollout[], + protos.google.cloud.deploy.v1.IListRolloutsRequest | null, + protos.google.cloud.deploy.v1.IListRolloutsResponse, ] > | void { request = request || {}; @@ -3345,7 +4692,7 @@ export class CloudDeployClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listTargets(request, options, callback); + return this.innerApiCalls.listRollouts(request, options, callback); } /** @@ -3353,38 +4700,37 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of targets. Format must be - * projects/{project_id}/locations/{location_name}. + * Required. The `Release` which owns this collection of `Rollout` objects. * @param {number} [request.pageSize] - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListTargets` call. + * Optional. A page token, received from a previous `ListRollouts` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Target|Target} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Rollout|Rollout} 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 `listTargetsAsync()` + * We recommend using `listRolloutsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listTargetsStream( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + listRolloutsStream( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3395,39 +4741,38 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listTargets']; + const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listTargets.createStream( - this.innerApiCalls.listTargets as GaxCall, + return this.descriptors.page.listRollouts.createStream( + this.innerApiCalls.listRollouts as GaxCall, request, callSettings ); } /** - * Equivalent to `listTargets`, but returns an iterable object. + * Equivalent to `listRollouts`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent, which owns this collection of targets. Format must be - * projects/{project_id}/locations/{location_name}. + * Required. The `Release` which owns this collection of `Rollout` objects. * @param {number} [request.pageSize] - * Optional. The maximum number of `Target` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `Target` objects - * will be returned. The maximum value is 1000; values above 1000 will be set - * to 1000. + * Optional. The maximum number of `Rollout` objects to return. The service + * may return fewer than this value. If unspecified, at most 50 `Rollout` + * objects will be returned. The maximum value is 1000; values above 1000 will + * be set to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListTargets` call. + * Optional. A page token, received from a previous `ListRollouts` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. * @param {string} [request.filter] - * Optional. Filter targets to be returned. See https://google.aip.dev/160 for - * more details. + * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 + * for more details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. @@ -3436,17 +4781,17 @@ export class CloudDeployClient { * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Target|Target}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_targets.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListTargets_async + * @example include:samples/generated/v1/cloud_deploy.list_rollouts.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListRollouts_async */ - listTargetsAsync( - request?: protos.google.cloud.deploy.v1.IListTargetsRequest, + listRolloutsAsync( + request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3455,100 +4800,97 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listTargets']; + const defaultCallSettings = this._defaults['listRollouts']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listTargets.asyncIterate( - this.innerApiCalls['listTargets'] as GaxCall, + return this.descriptors.page.listRollouts.asyncIterate( + this.innerApiCalls['listRollouts'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Releases in a given project and location. + * Lists JobRuns in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The `DeliveryPipeline` which owns this collection of `Release` - * objects. + * Required. The `Rollout` which owns this collection of `JobRun` objects. * @param {number} [request.pageSize] - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReleases` call. + * Optional. A page token, received from a previous `ListJobRuns` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other provided parameters match - * the call that provided the page token. + * When paginating, all other provided parameters match the call that provided + * the page token. * @param {string} [request.filter] - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Release|Release}. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. * 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 `listReleasesAsync()` + * We recommend using `listJobRunsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listReleases( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + listJobRuns( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.deploy.v1.IRelease[], - protos.google.cloud.deploy.v1.IListReleasesRequest | null, - protos.google.cloud.deploy.v1.IListReleasesResponse, + protos.google.cloud.deploy.v1.IJobRun[], + protos.google.cloud.deploy.v1.IListJobRunsRequest | null, + protos.google.cloud.deploy.v1.IListJobRunsResponse, ] >; - listReleases( - request: protos.google.cloud.deploy.v1.IListReleasesRequest, + listJobRuns( + request: protos.google.cloud.deploy.v1.IListJobRunsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, - protos.google.cloud.deploy.v1.IRelease + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun > ): void; - listReleases( - request: protos.google.cloud.deploy.v1.IListReleasesRequest, + listJobRuns( + request: protos.google.cloud.deploy.v1.IListJobRunsRequest, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, - protos.google.cloud.deploy.v1.IRelease + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun > ): void; - listReleases( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + listJobRuns( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - | protos.google.cloud.deploy.v1.IListReleasesResponse - | null - | undefined, - protos.google.cloud.deploy.v1.IRelease + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun >, callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListReleasesRequest, - protos.google.cloud.deploy.v1.IListReleasesResponse | null | undefined, - protos.google.cloud.deploy.v1.IRelease + protos.google.cloud.deploy.v1.IListJobRunsRequest, + protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, + protos.google.cloud.deploy.v1.IJobRun > ): Promise< [ - protos.google.cloud.deploy.v1.IRelease[], - protos.google.cloud.deploy.v1.IListReleasesRequest | null, - protos.google.cloud.deploy.v1.IListReleasesResponse, + protos.google.cloud.deploy.v1.IJobRun[], + protos.google.cloud.deploy.v1.IListJobRunsRequest | null, + protos.google.cloud.deploy.v1.IListJobRunsResponse, ] > | void { request = request || {}; @@ -3567,7 +4909,7 @@ export class CloudDeployClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listReleases(request, options, callback); + return this.innerApiCalls.listJobRuns(request, options, callback); } /** @@ -3575,38 +4917,37 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The `DeliveryPipeline` which owns this collection of `Release` - * objects. + * Required. The `Rollout` which owns this collection of `JobRun` objects. * @param {number} [request.pageSize] - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReleases` call. + * Optional. A page token, received from a previous `ListJobRuns` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other provided parameters match - * the call that provided the page token. + * When paginating, all other provided parameters match the call that provided + * the page token. * @param {string} [request.filter] - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Release|Release} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.JobRun|JobRun} 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 `listReleasesAsync()` + * We recommend using `listJobRunsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listReleasesStream( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + listJobRunsStream( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3617,39 +4958,38 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listReleases']; + const defaultCallSettings = this._defaults['listJobRuns']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listReleases.createStream( - this.innerApiCalls.listReleases as GaxCall, + return this.descriptors.page.listJobRuns.createStream( + this.innerApiCalls.listJobRuns as GaxCall, request, callSettings ); } /** - * Equivalent to `listReleases`, but returns an iterable object. + * Equivalent to `listJobRuns`, 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 `DeliveryPipeline` which owns this collection of `Release` - * objects. + * Required. The `Rollout` which owns this collection of `JobRun` objects. * @param {number} [request.pageSize] - * Optional. The maximum number of `Release` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Release` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. + * Optional. The maximum number of `JobRun` objects to return. The service may + * return fewer than this value. If unspecified, at most 50 `JobRun` objects + * will be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListReleases` call. + * Optional. A page token, received from a previous `ListJobRuns` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other provided parameters match - * the call that provided the page token. + * When paginating, all other provided parameters match the call that provided + * the page token. * @param {string} [request.filter] - * Optional. Filter releases to be returned. See https://google.aip.dev/160 - * for more details. + * Optional. Filter results to be returned. See https://google.aip.dev/160 for + * more details. * @param {string} [request.orderBy] * Optional. Field to sort by. See https://google.aip.dev/132#ordering for * more details. @@ -3658,17 +4998,17 @@ export class CloudDeployClient { * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Release|Release}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_releases.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListReleases_async + * @example include:samples/generated/v1/cloud_deploy.list_job_runs.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async */ - listReleasesAsync( - request?: protos.google.cloud.deploy.v1.IListReleasesRequest, + listJobRunsAsync( + request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3677,99 +5017,100 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listReleases']; + const defaultCallSettings = this._defaults['listJobRuns']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listReleases.asyncIterate( - this.innerApiCalls['listReleases'] as GaxCall, + return this.descriptors.page.listJobRuns.asyncIterate( + this.innerApiCalls['listJobRuns'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Rollouts in a given project and location. + * Lists Automations in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The `Release` which owns this collection of `Rollout` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRollouts` call. + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {number} request.pageSize + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomations` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. + * @param {string} request.filter + * Filter automations to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.Automation|Automation}. * 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 `listRolloutsAsync()` + * We recommend using `listAutomationsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listRollouts( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + listAutomations( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.deploy.v1.IRollout[], - protos.google.cloud.deploy.v1.IListRolloutsRequest | null, - protos.google.cloud.deploy.v1.IListRolloutsResponse, + protos.google.cloud.deploy.v1.IAutomation[], + protos.google.cloud.deploy.v1.IListAutomationsRequest | null, + protos.google.cloud.deploy.v1.IListAutomationsResponse, ] >; - listRollouts( - request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + listAutomations( + request: protos.google.cloud.deploy.v1.IListAutomationsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, - protos.google.cloud.deploy.v1.IRollout + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse | null | undefined, + protos.google.cloud.deploy.v1.IAutomation > ): void; - listRollouts( - request: protos.google.cloud.deploy.v1.IListRolloutsRequest, + listAutomations( + request: protos.google.cloud.deploy.v1.IListAutomationsRequest, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, - protos.google.cloud.deploy.v1.IRollout + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse | null | undefined, + protos.google.cloud.deploy.v1.IAutomation > ): void; - listRollouts( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + listAutomations( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - | protos.google.cloud.deploy.v1.IListRolloutsResponse + protos.google.cloud.deploy.v1.IListAutomationsRequest, + | protos.google.cloud.deploy.v1.IListAutomationsResponse | null | undefined, - protos.google.cloud.deploy.v1.IRollout + protos.google.cloud.deploy.v1.IAutomation >, callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListRolloutsRequest, - protos.google.cloud.deploy.v1.IListRolloutsResponse | null | undefined, - protos.google.cloud.deploy.v1.IRollout + protos.google.cloud.deploy.v1.IListAutomationsRequest, + protos.google.cloud.deploy.v1.IListAutomationsResponse | null | undefined, + protos.google.cloud.deploy.v1.IAutomation > ): Promise< [ - protos.google.cloud.deploy.v1.IRollout[], - protos.google.cloud.deploy.v1.IListRolloutsRequest | null, - protos.google.cloud.deploy.v1.IListRolloutsResponse, + protos.google.cloud.deploy.v1.IAutomation[], + protos.google.cloud.deploy.v1.IListAutomationsRequest | null, + protos.google.cloud.deploy.v1.IListAutomationsResponse, ] > | void { request = request || {}; @@ -3788,7 +5129,7 @@ export class CloudDeployClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listRollouts(request, options, callback); + return this.innerApiCalls.listAutomations(request, options, callback); } /** @@ -3796,37 +5137,38 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The `Release` which owns this collection of `Rollout` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRollouts` call. + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {number} request.pageSize + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomations` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. + * @param {string} request.filter + * Filter automations to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Rollout|Rollout} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.Automation|Automation} 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 `listRolloutsAsync()` + * We recommend using `listAutomationsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listRolloutsStream( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + listAutomationsStream( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3837,57 +5179,58 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listRollouts']; + const defaultCallSettings = this._defaults['listAutomations']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listRollouts.createStream( - this.innerApiCalls.listRollouts as GaxCall, + return this.descriptors.page.listAutomations.createStream( + this.innerApiCalls.listAutomations as GaxCall, request, callSettings ); } /** - * Equivalent to `listRollouts`, but returns an iterable object. + * Equivalent to `listAutomations`, 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 `Release` which owns this collection of `Rollout` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `Rollout` objects to return. The service - * may return fewer than this value. If unspecified, at most 50 `Rollout` - * objects will be returned. The maximum value is 1000; values above 1000 will - * be set to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRollouts` call. + * Required. The parent, which owns this collection of automations. Format + * must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param {number} request.pageSize + * The maximum number of automations to return. The service may return + * fewer than this value. If unspecified, at most 50 automations will + * be returned. The maximum value is 1000; values above 1000 will be set + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomations` call. * Provide this to retrieve the subsequent page. * * When paginating, all other provided parameters match * the call that provided the page token. - * @param {string} [request.filter] - * Optional. Filter rollouts to be returned. See https://google.aip.dev/160 - * for more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. + * @param {string} request.filter + * Filter automations to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.Rollout|Rollout}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.deploy.v1.Automation|Automation}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_rollouts.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListRollouts_async + * @example include:samples/generated/v1/cloud_deploy.list_automations.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListAutomations_async */ - listRolloutsAsync( - request?: protos.google.cloud.deploy.v1.IListRolloutsRequest, + listAutomationsAsync( + request?: protos.google.cloud.deploy.v1.IListAutomationsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3896,97 +5239,106 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listRollouts']; + const defaultCallSettings = this._defaults['listAutomations']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listRollouts.asyncIterate( - this.innerApiCalls['listRollouts'] as GaxCall, + return this.descriptors.page.listAutomations.asyncIterate( + this.innerApiCalls['listAutomations'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists JobRuns in a given project and location. + * Lists AutomationRuns in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The `Rollout` which owns this collection of `JobRun` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @param {number} request.pageSize + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListJobRuns` call. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomationRuns` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other provided parameters match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automationRuns to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. + * The first element of the array is Array of {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. * 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 `listJobRunsAsync()` + * We recommend using `listAutomationRunsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listJobRuns( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + listAutomationRuns( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.deploy.v1.IJobRun[], - protos.google.cloud.deploy.v1.IListJobRunsRequest | null, - protos.google.cloud.deploy.v1.IListJobRunsResponse, + protos.google.cloud.deploy.v1.IAutomationRun[], + protos.google.cloud.deploy.v1.IListAutomationRunsRequest | null, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse, ] >; - listJobRuns( - request: protos.google.cloud.deploy.v1.IListJobRunsRequest, + listAutomationRuns( + request: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, - protos.google.cloud.deploy.v1.IJobRun + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + | protos.google.cloud.deploy.v1.IListAutomationRunsResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IAutomationRun > ): void; - listJobRuns( - request: protos.google.cloud.deploy.v1.IListJobRunsRequest, + listAutomationRuns( + request: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, callback: PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, - protos.google.cloud.deploy.v1.IJobRun + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + | protos.google.cloud.deploy.v1.IListAutomationRunsResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IAutomationRun > ): void; - listJobRuns( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + listAutomationRuns( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, - protos.google.cloud.deploy.v1.IJobRun + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + | protos.google.cloud.deploy.v1.IListAutomationRunsResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IAutomationRun >, callback?: PaginationCallback< - protos.google.cloud.deploy.v1.IListJobRunsRequest, - protos.google.cloud.deploy.v1.IListJobRunsResponse | null | undefined, - protos.google.cloud.deploy.v1.IJobRun + protos.google.cloud.deploy.v1.IListAutomationRunsRequest, + | protos.google.cloud.deploy.v1.IListAutomationRunsResponse + | null + | undefined, + protos.google.cloud.deploy.v1.IAutomationRun > ): Promise< [ - protos.google.cloud.deploy.v1.IJobRun[], - protos.google.cloud.deploy.v1.IListJobRunsRequest | null, - protos.google.cloud.deploy.v1.IListJobRunsResponse, + protos.google.cloud.deploy.v1.IAutomationRun[], + protos.google.cloud.deploy.v1.IListAutomationRunsRequest | null, + protos.google.cloud.deploy.v1.IListAutomationRunsResponse, ] > | void { request = request || {}; @@ -4005,7 +5357,7 @@ export class CloudDeployClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listJobRuns(request, options, callback); + return this.innerApiCalls.listAutomationRuns(request, options, callback); } /** @@ -4013,37 +5365,38 @@ export class CloudDeployClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The `Rollout` which owns this collection of `JobRun` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @param {number} request.pageSize + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListJobRuns` call. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomationRuns` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other provided parameters match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automationRuns to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.JobRun|JobRun} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun} 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 `listJobRunsAsync()` + * We recommend using `listAutomationRunsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listJobRunsStream( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + listAutomationRunsStream( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -4054,57 +5407,58 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listJobRuns']; + const defaultCallSettings = this._defaults['listAutomationRuns']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listJobRuns.createStream( - this.innerApiCalls.listJobRuns as GaxCall, + return this.descriptors.page.listAutomationRuns.createStream( + this.innerApiCalls.listAutomationRuns as GaxCall, request, callSettings ); } /** - * Equivalent to `listJobRuns`, but returns an iterable object. + * Equivalent to `listAutomationRuns`, 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 `Rollout` which owns this collection of `JobRun` objects. - * @param {number} [request.pageSize] - * Optional. The maximum number of `JobRun` objects to return. The service may - * return fewer than this value. If unspecified, at most 50 `JobRun` objects - * will be returned. The maximum value is 1000; values above 1000 will be set + * Required. The parent, which owns this collection of automationRuns. Format + * must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @param {number} request.pageSize + * The maximum number of automationRuns to return. The service may return + * fewer than this value. If unspecified, at most 50 automationRuns will + * be returned. The maximum value is 1000; values above 1000 will be set * to 1000. - * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListJobRuns` call. + * @param {string} request.pageToken + * A page token, received from a previous `ListAutomationRuns` call. * Provide this to retrieve the subsequent page. * - * When paginating, all other provided parameters match the call that provided - * the page token. - * @param {string} [request.filter] - * Optional. Filter results to be returned. See https://google.aip.dev/160 for - * more details. - * @param {string} [request.orderBy] - * Optional. Field to sort by. See https://google.aip.dev/132#ordering for - * more details. + * When paginating, all other provided parameters match + * the call that provided the page token. + * @param {string} request.filter + * Filter automationRuns to be returned. All fields can be used in the + * filter. + * @param {string} request.orderBy + * Field to sort by. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.deploy.v1.JobRun|JobRun}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.deploy.v1.AutomationRun|AutomationRun}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/cloud_deploy.list_job_runs.js - * region_tag:clouddeploy_v1_generated_CloudDeploy_ListJobRuns_async + * @example include:samples/generated/v1/cloud_deploy.list_automation_runs.js + * region_tag:clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async */ - listJobRunsAsync( - request?: protos.google.cloud.deploy.v1.IListJobRunsRequest, + listAutomationRunsAsync( + request?: protos.google.cloud.deploy.v1.IListAutomationRunsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -4113,14 +5467,14 @@ export class CloudDeployClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listJobRuns']; + const defaultCallSettings = this._defaults['listAutomationRuns']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listJobRuns.asyncIterate( - this.innerApiCalls['listJobRuns'] as GaxCall, + return this.descriptors.page.listAutomationRuns.asyncIterate( + this.innerApiCalls['listAutomationRuns'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Gets the access control policy for a resource. Returns an empty policy @@ -4517,6 +5871,148 @@ export class CloudDeployClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified automation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} automation + * @returns {string} Resource name string. + */ + automationPath( + project: string, + location: string, + deliveryPipeline: string, + automation: string + ) { + return this.pathTemplates.automationPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + automation: automation, + }); + } + + /** + * Parse the project from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName) + .project; + } + + /** + * Parse the location from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName) + .location; + } + + /** + * Parse the delivery_pipeline from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName) + .delivery_pipeline; + } + + /** + * Parse the automation from Automation resource. + * + * @param {string} automationName + * A fully-qualified path representing Automation resource. + * @returns {string} A string representing the automation. + */ + matchAutomationFromAutomationName(automationName: string) { + return this.pathTemplates.automationPathTemplate.match(automationName) + .automation; + } + + /** + * Return a fully-qualified automationRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} delivery_pipeline + * @param {string} automation_run + * @returns {string} Resource name string. + */ + automationRunPath( + project: string, + location: string, + deliveryPipeline: string, + automationRun: string + ) { + return this.pathTemplates.automationRunPathTemplate.render({ + project: project, + location: location, + delivery_pipeline: deliveryPipeline, + automation_run: automationRun, + }); + } + + /** + * Parse the project from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName) + .project; + } + + /** + * Parse the location from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName) + .location; + } + + /** + * Parse the delivery_pipeline from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the delivery_pipeline. + */ + matchDeliveryPipelineFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName) + .delivery_pipeline; + } + + /** + * Parse the automation_run from AutomationRun resource. + * + * @param {string} automationRunName + * A fully-qualified path representing AutomationRun resource. + * @returns {string} A string representing the automation_run. + */ + matchAutomationRunFromAutomationRunName(automationRunName: string) { + return this.pathTemplates.automationRunPathTemplate.match(automationRunName) + .automation_run; + } + /** * Return a fully-qualified build resource name string. * @@ -4710,6 +6206,55 @@ export class CloudDeployClient { ).delivery_pipeline; } + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath(project: string, location: string, job: string) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + /** * Return a fully-qualified jobRun resource name string. * diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json index 7156ee7449b..517f87e4a48 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_client_config.json @@ -62,6 +62,10 @@ "retry_codes_name": "unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, + "RollbackTarget": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetTarget": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -161,6 +165,46 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAutomation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAutomations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAutomationRun": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAutomationRuns": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CancelAutomationRun": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json index fcfe1749c31..bbe672c08a4 100644 --- a/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json +++ b/packages/google-cloud-deploy/src/v1/cloud_deploy_proto_list.json @@ -1,4 +1,6 @@ [ + "../../protos/google/cloud/deploy/v1/automation_payload.proto", + "../../protos/google/cloud/deploy/v1/automationrun_payload.proto", "../../protos/google/cloud/deploy/v1/cloud_deploy.proto", "../../protos/google/cloud/deploy/v1/deliverypipeline_notification_payload.proto", "../../protos/google/cloud/deploy/v1/jobrun_notification_payload.proto", @@ -6,5 +8,6 @@ "../../protos/google/cloud/deploy/v1/release_notification_payload.proto", "../../protos/google/cloud/deploy/v1/release_render_payload.proto", "../../protos/google/cloud/deploy/v1/rollout_notification_payload.proto", + "../../protos/google/cloud/deploy/v1/rollout_update_payload.proto", "../../protos/google/cloud/deploy/v1/target_notification_payload.proto" ] diff --git a/packages/google-cloud-deploy/src/v1/gapic_metadata.json b/packages/google-cloud-deploy/src/v1/gapic_metadata.json index dfc0d13afe7..ea8136ea8b3 100644 --- a/packages/google-cloud-deploy/src/v1/gapic_metadata.json +++ b/packages/google-cloud-deploy/src/v1/gapic_metadata.json @@ -15,6 +15,11 @@ "getDeliveryPipeline" ] }, + "RollbackTarget": { + "methods": [ + "rollbackTarget" + ] + }, "GetTarget": { "methods": [ "getTarget" @@ -75,6 +80,21 @@ "getConfig" ] }, + "GetAutomation": { + "methods": [ + "getAutomation" + ] + }, + "GetAutomationRun": { + "methods": [ + "getAutomationRun" + ] + }, + "CancelAutomationRun": { + "methods": [ + "cancelAutomationRun" + ] + }, "CreateDeliveryPipeline": { "methods": [ "createDeliveryPipeline" @@ -115,6 +135,21 @@ "createRollout" ] }, + "CreateAutomation": { + "methods": [ + "createAutomation" + ] + }, + "UpdateAutomation": { + "methods": [ + "updateAutomation" + ] + }, + "DeleteAutomation": { + "methods": [ + "deleteAutomation" + ] + }, "ListDeliveryPipelines": { "methods": [ "listDeliveryPipelines", @@ -149,6 +184,20 @@ "listJobRunsStream", "listJobRunsAsync" ] + }, + "ListAutomations": { + "methods": [ + "listAutomations", + "listAutomationsStream", + "listAutomationsAsync" + ] + }, + "ListAutomationRuns": { + "methods": [ + "listAutomationRuns", + "listAutomationRunsStream", + "listAutomationRunsAsync" + ] } } }, @@ -160,6 +209,11 @@ "getDeliveryPipeline" ] }, + "RollbackTarget": { + "methods": [ + "rollbackTarget" + ] + }, "GetTarget": { "methods": [ "getTarget" @@ -220,6 +274,21 @@ "getConfig" ] }, + "GetAutomation": { + "methods": [ + "getAutomation" + ] + }, + "GetAutomationRun": { + "methods": [ + "getAutomationRun" + ] + }, + "CancelAutomationRun": { + "methods": [ + "cancelAutomationRun" + ] + }, "CreateDeliveryPipeline": { "methods": [ "createDeliveryPipeline" @@ -260,6 +329,21 @@ "createRollout" ] }, + "CreateAutomation": { + "methods": [ + "createAutomation" + ] + }, + "UpdateAutomation": { + "methods": [ + "updateAutomation" + ] + }, + "DeleteAutomation": { + "methods": [ + "deleteAutomation" + ] + }, "ListDeliveryPipelines": { "methods": [ "listDeliveryPipelines", @@ -294,6 +378,20 @@ "listJobRunsStream", "listJobRunsAsync" ] + }, + "ListAutomations": { + "methods": [ + "listAutomations", + "listAutomationsStream", + "listAutomationsAsync" + ] + }, + "ListAutomationRuns": { + "methods": [ + "listAutomationRuns", + "listAutomationRunsStream", + "listAutomationRunsAsync" + ] } } } diff --git a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts index a7dae5b6feb..1ebc7b44171 100644 --- a/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts +++ b/packages/google-cloud-deploy/test/gapic_cloud_deploy_v1.ts @@ -394,6 +394,136 @@ describe('v1.CloudDeployClient', () => { }); }); + describe('rollbackTarget', () => { + it('invokes rollbackTarget without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.RollbackTargetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetResponse() + ); + client.innerApiCalls.rollbackTarget = stubSimpleCall(expectedResponse); + const [response] = await client.rollbackTarget(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.rollbackTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackTarget without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.RollbackTargetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetResponse() + ); + client.innerApiCalls.rollbackTarget = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackTarget( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IRollbackTargetResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.rollbackTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackTarget with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.RollbackTargetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackTarget = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.rollbackTarget(request), expectedError); + const actualRequest = ( + client.innerApiCalls.rollbackTarget as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackTarget as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackTarget with closed client', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.RollbackTargetRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.RollbackTargetRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.rollbackTarget(request), expectedError); + }); + }); + describe('getTarget', () => { it('invokes getTarget without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ @@ -1939,69 +2069,64 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('createDeliveryPipeline', () => { - it('invokes createDeliveryPipeline without error', async () => { + describe('getAutomation', () => { + it('invokes getAutomation without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetAutomationRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.deploy.v1.Automation() ); - client.innerApiCalls.createDeliveryPipeline = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createDeliveryPipeline(request); - const [response] = await operation.promise(); + client.innerApiCalls.getAutomation = stubSimpleCall(expectedResponse); + const [response] = await client.getAutomation(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomation as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomation as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createDeliveryPipeline without error using callback', async () => { + it('invokes getAutomation without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetAutomationRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.deploy.v1.Automation() ); - client.innerApiCalls.createDeliveryPipeline = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getAutomation = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createDeliveryPipeline( + client.getAutomation( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - > | null + result?: protos.google.cloud.deploy.v1.IAutomation | null ) => { if (err) { reject(err); @@ -2011,196 +2136,127 @@ describe('v1.CloudDeployClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomation as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomation as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createDeliveryPipeline with call error', async () => { + it('invokes getAutomation with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] + '.google.cloud.deploy.v1.GetAutomationRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( + client.innerApiCalls.getAutomation = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.createDeliveryPipeline(request), - expectedError - ); + await assert.rejects(client.getAutomation(request), expectedError); const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomation as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomation as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createDeliveryPipeline with LRO error', async () => { + it('invokes getAutomation with closed client', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createDeliveryPipeline(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createDeliveryPipeline as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateDeliveryPipelineProgress without error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateDeliveryPipelineProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateDeliveryPipelineProgress with error', async () => { - const client = new clouddeployModule.v1.CloudDeployClient({ - 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.checkCreateDeliveryPipelineProgress(''), - expectedError + '.google.cloud.deploy.v1.GetAutomationRequest', + ['name'] ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAutomation(request), expectedError); }); }); - describe('updateDeliveryPipeline', () => { - it('invokes updateDeliveryPipeline without error', async () => { + describe('getAutomationRun', () => { + it('invokes getAutomationRun without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); - request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', - ['deliveryPipeline', 'name'] + '.google.cloud.deploy.v1.GetAutomationRunRequest', + ['name'] ); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.deploy.v1.AutomationRun() ); - client.innerApiCalls.updateDeliveryPipeline = - stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDeliveryPipeline(request); - const [response] = await operation.promise(); + client.innerApiCalls.getAutomationRun = stubSimpleCall(expectedResponse); + const [response] = await client.getAutomationRun(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomationRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomationRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateDeliveryPipeline without error using callback', async () => { + it('invokes getAutomationRun without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); - request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', - ['deliveryPipeline', 'name'] + '.google.cloud.deploy.v1.GetAutomationRunRequest', + ['name'] ); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.deploy.v1.AutomationRun() ); - client.innerApiCalls.updateDeliveryPipeline = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getAutomationRun = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateDeliveryPipeline( + client.getAutomationRun( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - > | null + result?: protos.google.cloud.deploy.v1.IAutomationRun | null ) => { if (err) { reject(err); @@ -2210,194 +2266,261 @@ describe('v1.CloudDeployClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.IDeliveryPipeline, - protos.google.cloud.deploy.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomationRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomationRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateDeliveryPipeline with call error', async () => { + it('invokes getAutomationRun with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); - request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', - ['deliveryPipeline', 'name'] + '.google.cloud.deploy.v1.GetAutomationRunRequest', + ['name'] ); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( + client.innerApiCalls.getAutomationRun = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.updateDeliveryPipeline(request), - expectedError - ); + await assert.rejects(client.getAutomationRun(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomationRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.getAutomationRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateDeliveryPipeline with LRO error', async () => { + it('invokes getAutomationRun with closed client', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.GetAutomationRunRequest() ); - request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', - ['deliveryPipeline', 'name'] + '.google.cloud.deploy.v1.GetAutomationRunRequest', + ['name'] ); - request.deliveryPipeline.name = defaultValue1; - const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAutomationRun(request), expectedError); + }); + }); + + describe('cancelAutomationRun', () => { + it('invokes cancelAutomationRun without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); - const [operation] = await client.updateDeliveryPipeline(request); - await assert.rejects(operation.promise(), expectedError); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CancelAutomationRunRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunResponse() + ); + client.innerApiCalls.cancelAutomationRun = + stubSimpleCall(expectedResponse); + const [response] = await client.cancelAutomationRun(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.cancelAutomationRun as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDeliveryPipeline as SinonStub + client.innerApiCalls.cancelAutomationRun as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateDeliveryPipelineProgress without error', async () => { + it('invokes cancelAutomationRun without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); - 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.checkUpdateDeliveryPipelineProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CancelAutomationRunRequest', + ['name'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunResponse() + ); + client.innerApiCalls.cancelAutomationRun = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelAutomationRun( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.ICancelAutomationRunResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelAutomationRun as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelAutomationRun as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateDeliveryPipelineProgress with error', async () => { + it('invokes cancelAutomationRun with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CancelAutomationRunRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.cancelAutomationRun = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkUpdateDeliveryPipelineProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + await assert.rejects(client.cancelAutomationRun(request), expectedError); + const actualRequest = ( + client.innerApiCalls.cancelAutomationRun as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelAutomationRun as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - }); - describe('deleteDeliveryPipeline', () => { - it('invokes deleteDeliveryPipeline without error', async () => { + it('invokes cancelAutomationRun with closed client', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.CancelAutomationRunRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', + '.google.cloud.deploy.v1.CancelAutomationRunRequest', ['name'] ); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelAutomationRun(request), expectedError); + }); + }); + + describe('createDeliveryPipeline', () => { + it('invokes createDeliveryPipeline without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteDeliveryPipeline = + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteDeliveryPipeline(request); + const [operation] = await client.createDeliveryPipeline(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteDeliveryPipeline without error using callback', async () => { + it('invokes createDeliveryPipeline without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', - ['name'] + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteDeliveryPipeline = + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteDeliveryPipeline( + client.createDeliveryPipeline( request, ( err?: Error | null, result?: LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata > | null ) => { @@ -2410,89 +2533,89 @@ describe('v1.CloudDeployClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteDeliveryPipeline with call error', async () => { + it('invokes createDeliveryPipeline with call error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', - ['name'] + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( undefined, expectedError ); await assert.rejects( - client.deleteDeliveryPipeline(request), + client.createDeliveryPipeline(request), expectedError ); const actualRequest = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteDeliveryPipeline with LRO error', async () => { + it('invokes createDeliveryPipeline with LRO error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() + new protos.google.cloud.deploy.v1.CreateDeliveryPipelineRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', - ['name'] + '.google.cloud.deploy.v1.CreateDeliveryPipelineRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( + client.innerApiCalls.createDeliveryPipeline = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteDeliveryPipeline(request); + const [operation] = await client.createDeliveryPipeline(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteDeliveryPipeline as SinonStub + client.innerApiCalls.createDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteDeliveryPipelineProgress without error', async () => { + it('invokes checkCreateDeliveryPipelineProgress without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2506,7 +2629,7 @@ describe('v1.CloudDeployClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteDeliveryPipelineProgress( + const decodedOperation = await client.checkCreateDeliveryPipelineProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2514,7 +2637,7 @@ describe('v1.CloudDeployClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteDeliveryPipelineProgress with error', async () => { + it('invokes checkCreateDeliveryPipelineProgress with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2527,73 +2650,76 @@ describe('v1.CloudDeployClient', () => { expectedError ); await assert.rejects( - client.checkDeleteDeliveryPipelineProgress(''), + client.checkCreateDeliveryPipelineProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createTarget', () => { - it('invokes createTarget without error', async () => { + describe('updateDeliveryPipeline', () => { + it('invokes updateDeliveryPipeline without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); + request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateTargetRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createTarget = stubLongRunningCall(expectedResponse); - const [operation] = await client.createTarget(request); + client.innerApiCalls.updateDeliveryPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDeliveryPipeline(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createTarget without error using callback', async () => { + it('invokes updateDeliveryPipeline without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); + request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateTargetRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createTarget = + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createTarget( + client.updateDeliveryPipeline( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata > | null ) => { @@ -2606,86 +2732,91 @@ describe('v1.CloudDeployClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.cloud.deploy.v1.IDeliveryPipeline, protos.google.cloud.deploy.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createTarget with call error', async () => { + it('invokes updateDeliveryPipeline with call error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); + request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateTargetRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createTarget = stubLongRunningCall( + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createTarget(request), expectedError); + await assert.rejects( + client.updateDeliveryPipeline(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createTarget with LRO error', async () => { + it('invokes updateDeliveryPipeline with LRO error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateTargetRequest() + new protos.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest() ); + request.deliveryPipeline ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateTargetRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest', + ['deliveryPipeline', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.deliveryPipeline.name = defaultValue1; + const expectedHeaderRequestParams = `delivery_pipeline.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createTarget = stubLongRunningCall( + client.innerApiCalls.updateDeliveryPipeline = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createTarget(request); + const [operation] = await client.updateDeliveryPipeline(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTarget as SinonStub + client.innerApiCalls.updateDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateTargetProgress without error', async () => { + it('invokes checkUpdateDeliveryPipelineProgress without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2699,7 +2830,7 @@ describe('v1.CloudDeployClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateTargetProgress( + const decodedOperation = await client.checkUpdateDeliveryPipelineProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2707,7 +2838,7 @@ describe('v1.CloudDeployClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateTargetProgress with error', async () => { + it('invokes checkUpdateDeliveryPipelineProgress with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2719,73 +2850,75 @@ describe('v1.CloudDeployClient', () => { undefined, expectedError ); - await assert.rejects(client.checkCreateTargetProgress(''), expectedError); + await assert.rejects( + client.checkUpdateDeliveryPipelineProgress(''), + expectedError + ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('updateTarget', () => { - it('invokes updateTarget without error', async () => { + describe('deleteDeliveryPipeline', () => { + it('invokes deleteDeliveryPipeline without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateTargetRequest', - ['target', 'name'] + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', + ['name'] ); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateTarget = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateTarget(request); + client.innerApiCalls.deleteDeliveryPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDeliveryPipeline(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateTarget without error using callback', async () => { + it('invokes deleteDeliveryPipeline without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateTargetRequest', - ['target', 'name'] + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', + ['name'] ); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateTarget = + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateTarget( + client.deleteDeliveryPipeline( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata > | null ) => { @@ -2798,88 +2931,89 @@ describe('v1.CloudDeployClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.ITarget, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateTarget with call error', async () => { + it('invokes deleteDeliveryPipeline with call error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateTargetRequest', - ['target', 'name'] + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', + ['name'] ); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateTarget = stubLongRunningCall( + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.updateTarget(request), expectedError); + await assert.rejects( + client.deleteDeliveryPipeline(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateTarget with LRO error', async () => { + it('invokes deleteDeliveryPipeline with LRO error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.UpdateTargetRequest() + new protos.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest() ); - request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.UpdateTargetRequest', - ['target', 'name'] + '.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest', + ['name'] ); - request.target.name = defaultValue1; - const expectedHeaderRequestParams = `target.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateTarget = stubLongRunningCall( + client.innerApiCalls.deleteDeliveryPipeline = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.updateTarget(request); + const [operation] = await client.deleteDeliveryPipeline(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTarget as SinonStub + client.innerApiCalls.deleteDeliveryPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateTargetProgress without error', async () => { + it('invokes checkDeleteDeliveryPipelineProgress without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2893,7 +3027,7 @@ describe('v1.CloudDeployClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateTargetProgress( + const decodedOperation = await client.checkDeleteDeliveryPipelineProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2901,7 +3035,7 @@ describe('v1.CloudDeployClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkUpdateTargetProgress with error', async () => { + it('invokes checkDeleteDeliveryPipelineProgress with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2913,71 +3047,74 @@ describe('v1.CloudDeployClient', () => { undefined, expectedError ); - await assert.rejects(client.checkUpdateTargetProgress(''), expectedError); + await assert.rejects( + client.checkDeleteDeliveryPipelineProgress(''), + expectedError + ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deleteTarget', () => { - it('invokes deleteTarget without error', async () => { + describe('createTarget', () => { + it('invokes createTarget without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() + new protos.google.cloud.deploy.v1.CreateTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteTargetRequest', - ['name'] + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteTarget = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteTarget(request); + client.innerApiCalls.createTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.createTarget(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteTarget without error using callback', async () => { + it('invokes createTarget without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() + new protos.google.cloud.deploy.v1.CreateTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteTargetRequest', - ['name'] + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteTarget = + client.innerApiCalls.createTarget = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteTarget( + client.createTarget( request, ( err?: Error | null, result?: LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata > | null ) => { @@ -2990,86 +3127,86 @@ describe('v1.CloudDeployClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteTarget with call error', async () => { + it('invokes createTarget with call error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() + new protos.google.cloud.deploy.v1.CreateTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteTargetRequest', - ['name'] + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteTarget = stubLongRunningCall( + client.innerApiCalls.createTarget = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.deleteTarget(request), expectedError); + await assert.rejects(client.createTarget(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteTarget with LRO error', async () => { + it('invokes createTarget with LRO error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.DeleteTargetRequest() + new protos.google.cloud.deploy.v1.CreateTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.DeleteTargetRequest', - ['name'] + '.google.cloud.deploy.v1.CreateTargetRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteTarget = stubLongRunningCall( + client.innerApiCalls.createTarget = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteTarget(request); + const [operation] = await client.createTarget(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTarget as SinonStub + client.innerApiCalls.createTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteTargetProgress without error', async () => { + it('invokes checkCreateTargetProgress without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3083,7 +3220,7 @@ describe('v1.CloudDeployClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteTargetProgress( + const decodedOperation = await client.checkCreateTargetProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3091,7 +3228,7 @@ describe('v1.CloudDeployClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteTargetProgress with error', async () => { + it('invokes checkCreateTargetProgress with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3103,72 +3240,73 @@ describe('v1.CloudDeployClient', () => { undefined, expectedError ); - await assert.rejects(client.checkDeleteTargetProgress(''), expectedError); + await assert.rejects(client.checkCreateTargetProgress(''), expectedError); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createRelease', () => { - it('invokes createRelease without error', async () => { + describe('updateTarget', () => { + it('invokes updateTarget without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() + new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); + request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateReleaseRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createRelease = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createRelease(request); + client.innerApiCalls.updateTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateTarget(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createRelease without error using callback', async () => { + it('invokes updateTarget without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() + new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); + request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateReleaseRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createRelease = + client.innerApiCalls.updateTarget = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createRelease( + client.updateTarget( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata > | null ) => { @@ -3181,86 +3319,88 @@ describe('v1.CloudDeployClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.ITarget, protos.google.cloud.deploy.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createRelease with call error', async () => { + it('invokes updateTarget with call error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() + new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); + request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateReleaseRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createRelease = stubLongRunningCall( + client.innerApiCalls.updateTarget = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createRelease(request), expectedError); + await assert.rejects(client.updateTarget(request), expectedError); const actualRequest = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createRelease with LRO error', async () => { + it('invokes updateTarget with LRO error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateReleaseRequest() + new protos.google.cloud.deploy.v1.UpdateTargetRequest() ); + request.target ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateReleaseRequest', - ['parent'] + '.google.cloud.deploy.v1.UpdateTargetRequest', + ['target', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.target.name = defaultValue1; + const expectedHeaderRequestParams = `target.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createRelease = stubLongRunningCall( + client.innerApiCalls.updateTarget = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createRelease(request); + const [operation] = await client.updateTarget(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRelease as SinonStub + client.innerApiCalls.updateTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateReleaseProgress without error', async () => { + it('invokes checkUpdateTargetProgress without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3274,7 +3414,7 @@ describe('v1.CloudDeployClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateReleaseProgress( + const decodedOperation = await client.checkUpdateTargetProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3282,7 +3422,7 @@ describe('v1.CloudDeployClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateReleaseProgress with error', async () => { + it('invokes checkUpdateTargetProgress with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3294,75 +3434,71 @@ describe('v1.CloudDeployClient', () => { undefined, expectedError ); - await assert.rejects( - client.checkCreateReleaseProgress(''), - expectedError - ); + await assert.rejects(client.checkUpdateTargetProgress(''), expectedError); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createRollout', () => { - it('invokes createRollout without error', async () => { + describe('deleteTarget', () => { + it('invokes deleteTarget without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() + new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateRolloutRequest', - ['parent'] + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createRollout = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createRollout(request); + client.innerApiCalls.deleteTarget = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTarget(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createRollout without error using callback', async () => { + it('invokes deleteTarget without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() + new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateRolloutRequest', - ['parent'] + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createRollout = + client.innerApiCalls.deleteTarget = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createRollout( + client.deleteTarget( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata > | null ) => { @@ -3375,86 +3511,86 @@ describe('v1.CloudDeployClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.deploy.v1.IRollout, + protos.google.protobuf.IEmpty, protos.google.cloud.deploy.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createRollout with call error', async () => { + it('invokes deleteTarget with call error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() + new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateRolloutRequest', - ['parent'] + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createRollout = stubLongRunningCall( + client.innerApiCalls.deleteTarget = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createRollout(request), expectedError); + await assert.rejects(client.deleteTarget(request), expectedError); const actualRequest = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createRollout with LRO error', async () => { + it('invokes deleteTarget with LRO error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.CreateRolloutRequest() + new protos.google.cloud.deploy.v1.DeleteTargetRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.CreateRolloutRequest', - ['parent'] + '.google.cloud.deploy.v1.DeleteTargetRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createRollout = stubLongRunningCall( + client.innerApiCalls.deleteTarget = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createRollout(request); + const [operation] = await client.deleteTarget(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createRollout as SinonStub + client.innerApiCalls.deleteTarget as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateRolloutProgress without error', async () => { + it('invokes checkDeleteTargetProgress without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3468,7 +3604,7 @@ describe('v1.CloudDeployClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateRolloutProgress( + const decodedOperation = await client.checkDeleteTargetProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3476,7 +3612,7 @@ describe('v1.CloudDeployClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateRolloutProgress with error', async () => { + it('invokes checkDeleteTargetProgress with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3488,89 +3624,1695 @@ describe('v1.CloudDeployClient', () => { undefined, expectedError ); - await assert.rejects( - client.checkCreateRolloutProgress(''), - expectedError - ); + await assert.rejects(client.checkDeleteTargetProgress(''), expectedError); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listDeliveryPipelines', () => { - it('invokes listDeliveryPipelines without error', async () => { + describe('createRelease', () => { + it('invokes createRelease without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.CreateReleaseRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.CreateReleaseRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - ]; - client.innerApiCalls.listDeliveryPipelines = - stubSimpleCall(expectedResponse); - const [response] = await client.listDeliveryPipelines(request); - assert.deepStrictEqual(response, expectedResponse); + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRelease = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createRelease(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRelease without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRelease = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRelease( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IRelease, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRelease with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRelease = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createRelease(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRelease with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateReleaseRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateReleaseRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRelease = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createRelease(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRelease as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReleaseProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateReleaseProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReleaseProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateReleaseProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createRollout', () => { + it('invokes createRollout without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRollout = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createRollout(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRollout without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createRollout = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createRollout( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IRollout, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRollout with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRollout = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createRollout(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createRollout with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateRolloutRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateRolloutRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createRollout = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createRollout(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createRollout as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateRolloutProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateRolloutProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateRolloutProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateRolloutProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAutomation', () => { + it('invokes createAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateAutomationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAutomation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createAutomation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateAutomationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAutomation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAutomation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutomation with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateAutomationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutomation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createAutomation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutomation with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.CreateAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.CreateAutomationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutomation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAutomation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAutomationProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateAutomationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAutomationProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkCreateAutomationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAutomation', () => { + it('invokes updateAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateAutomationRequest', + ['automation', 'name'] + ); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutomation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAutomation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateAutomationRequest', + ['automation', 'name'] + ); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateAutomation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAutomation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.deploy.v1.IAutomation, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomation with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateAutomationRequest', + ['automation', 'name'] + ); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutomation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAutomation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutomation with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.UpdateAutomationRequest() + ); + request.automation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.UpdateAutomationRequest', + ['automation', 'name'] + ); + request.automation.name = defaultValue1; + const expectedHeaderRequestParams = `automation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutomation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateAutomation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAutomationProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateAutomationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAutomationProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkUpdateAutomationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteAutomation', () => { + it('invokes deleteAutomation without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteAutomationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAutomation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAutomation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutomation without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteAutomationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteAutomation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAutomation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.deploy.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutomation with call error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteAutomationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAutomation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAutomation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutomation with LRO error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.DeleteAutomationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.DeleteAutomationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAutomation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteAutomation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutomation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAutomationProgress without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteAutomationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAutomationProgress with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + 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.checkDeleteAutomationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listDeliveryPipelines', () => { + it('invokes listDeliveryPipelines without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.innerApiCalls.listDeliveryPipelines = + stubSimpleCall(expectedResponse); + const [response] = await client.listDeliveryPipelines(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeliveryPipelines without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.innerApiCalls.listDeliveryPipelines = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeliveryPipelines( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.IDeliveryPipeline[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeliveryPipelines with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeliveryPipelines = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listDeliveryPipelines(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeliveryPipelines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeliveryPipelinesStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.descriptors.page.listDeliveryPipelines.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDeliveryPipelinesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { + 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.listDeliveryPipelines + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDeliveryPipelines, request) + ); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDeliveryPipelinesStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeliveryPipelines.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeliveryPipelinesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDeliveryPipelines, request) + ); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeliveryPipelines without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.DeliveryPipeline() + ), + ]; + client.descriptors.page.listDeliveryPipelines.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + const iterable = client.listDeliveryPipelinesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDeliveryPipelines with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeliveryPipelines.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeliveryPipelinesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listDeliveryPipelines + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listTargets', () => { + it('invokes listTargets without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.innerApiCalls.listTargets = stubSimpleCall(expectedResponse); + const [response] = await client.listTargets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTargets without error using callback', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.innerApiCalls.listTargets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTargets( + request, + ( + err?: Error | null, + result?: protos.google.cloud.deploy.v1.ITarget[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTargets with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTargets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listTargets(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTargets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTargetsStream without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.descriptors.page.listTargets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTargetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Target[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + 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.listTargets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTargets, request) + ); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTargetsStream with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTargets.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTargetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.deploy.v1.Target[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTargets, request) + ); + assert( + (client.descriptors.page.listTargets.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTargets without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + ]; + client.descriptors.page.listTargets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + const iterable = client.listTargetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTargets with error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListTargetsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListTargetsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listTargetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listTargets.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReleases', () => { + it('invokes listReleases without error', async () => { + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.deploy.v1.ListReleasesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.deploy.v1.ListReleasesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + ]; + client.innerApiCalls.listReleases = stubSimpleCall(expectedResponse); + const [response] = await client.listReleases(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDeliveryPipelines as SinonStub + client.innerApiCalls.listReleases as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDeliveryPipelines as SinonStub + client.innerApiCalls.listReleases as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDeliveryPipelines without error using callback', async () => { + it('invokes listReleases without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.ListReleasesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListReleasesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), ]; - client.innerApiCalls.listDeliveryPipelines = + client.innerApiCalls.listReleases = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDeliveryPipelines( + client.listReleases( request, ( err?: Error | null, - result?: protos.google.cloud.deploy.v1.IDeliveryPipeline[] | null + result?: protos.google.cloud.deploy.v1.IRelease[] | null ) => { if (err) { reject(err); @@ -3583,86 +5325,74 @@ describe('v1.CloudDeployClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDeliveryPipelines as SinonStub + client.innerApiCalls.listReleases as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDeliveryPipelines as SinonStub + client.innerApiCalls.listReleases as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDeliveryPipelines with error', async () => { + it('invokes listReleases with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.ListReleasesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListReleasesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDeliveryPipelines = stubSimpleCall( + client.innerApiCalls.listReleases = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listDeliveryPipelines(request), - expectedError - ); + await assert.rejects(client.listReleases(request), expectedError); const actualRequest = ( - client.innerApiCalls.listDeliveryPipelines as SinonStub + client.innerApiCalls.listReleases as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDeliveryPipelines as SinonStub + client.innerApiCalls.listReleases as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDeliveryPipelinesStream without error', async () => { + it('invokes listReleasesStream without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.ListReleasesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListReleasesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), ]; - client.descriptors.page.listDeliveryPipelines.createStream = + client.descriptors.page.listReleases.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDeliveryPipelinesStream(request); + const stream = client.listReleasesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; - stream.on( - 'data', - (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { - responses.push(response); - } - ); + const responses: protos.google.cloud.deploy.v1.Release[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -3673,18 +5403,12 @@ describe('v1.CloudDeployClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listDeliveryPipelines - .createStream as SinonStub - ) + (client.descriptors.page.listReleases.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listDeliveryPipelines, request) + .calledWith(client.innerApiCalls.listReleases, request) ); - assert( - ( - client.descriptors.page.listDeliveryPipelines - .createStream as SinonStub - ) + assert( + (client.descriptors.page.listReleases.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3692,33 +5416,32 @@ describe('v1.CloudDeployClient', () => { ); }); - it('invokes listDeliveryPipelinesStream with error', async () => { + it('invokes listReleasesStream with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.ListReleasesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListReleasesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDeliveryPipelines.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listDeliveryPipelinesStream(request); + client.descriptors.page.listReleases.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listReleasesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.DeliveryPipeline[] = []; - stream.on( - 'data', - (response: protos.google.cloud.deploy.v1.DeliveryPipeline) => { - responses.push(response); - } - ); + const responses: protos.google.cloud.deploy.v1.Release[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -3728,18 +5451,12 @@ describe('v1.CloudDeployClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listDeliveryPipelines - .createStream as SinonStub - ) + (client.descriptors.page.listReleases.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listDeliveryPipelines, request) + .calledWith(client.innerApiCalls.listReleases, request) ); assert( - ( - client.descriptors.page.listDeliveryPipelines - .createStream as SinonStub - ) + (client.descriptors.page.listReleases.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3747,52 +5464,42 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listDeliveryPipelines without error', async () => { + it('uses async iteration with listReleases without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.ListReleasesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListReleasesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), - generateSampleMessage( - new protos.google.cloud.deploy.v1.DeliveryPipeline() - ), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), ]; - client.descriptors.page.listDeliveryPipelines.asyncIterate = + client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; - const iterable = client.listDeliveryPipelinesAsync(request); + const responses: protos.google.cloud.deploy.v1.IRelease[] = []; + const iterable = client.listReleasesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDeliveryPipelines - .asyncIterate as SinonStub + client.descriptors.page.listReleases.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDeliveryPipelines - .asyncIterate as SinonStub - ) + (client.descriptors.page.listReleases.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3800,43 +5507,39 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listDeliveryPipelines with error', async () => { + it('uses async iteration with listReleases with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListDeliveryPipelinesRequest() + new protos.google.cloud.deploy.v1.ListReleasesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListDeliveryPipelinesRequest', + '.google.cloud.deploy.v1.ListReleasesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDeliveryPipelines.asyncIterate = + client.descriptors.page.listReleases.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDeliveryPipelinesAsync(request); + const iterable = client.listReleasesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IDeliveryPipeline[] = []; + const responses: protos.google.cloud.deploy.v1.IRelease[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listDeliveryPipelines - .asyncIterate as SinonStub + client.descriptors.page.listReleases.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDeliveryPipelines - .asyncIterate as SinonStub - ) + (client.descriptors.page.listReleases.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3845,68 +5548,68 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('listTargets', () => { - it('invokes listTargets without error', async () => { + describe('listRollouts', () => { + it('invokes listRollouts without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), ]; - client.innerApiCalls.listTargets = stubSimpleCall(expectedResponse); - const [response] = await client.listTargets(request); + client.innerApiCalls.listRollouts = stubSimpleCall(expectedResponse); + const [response] = await client.listRollouts(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listTargets as SinonStub + client.innerApiCalls.listRollouts as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTargets as SinonStub + client.innerApiCalls.listRollouts as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTargets without error using callback', async () => { + it('invokes listRollouts without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), ]; - client.innerApiCalls.listTargets = + client.innerApiCalls.listRollouts = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listTargets( + client.listRollouts( request, ( err?: Error | null, - result?: protos.google.cloud.deploy.v1.ITarget[] | null + result?: protos.google.cloud.deploy.v1.IRollout[] | null ) => { if (err) { reject(err); @@ -3919,72 +5622,72 @@ describe('v1.CloudDeployClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listTargets as SinonStub + client.innerApiCalls.listRollouts as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTargets as SinonStub + client.innerApiCalls.listRollouts as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTargets with error', async () => { + it('invokes listRollouts with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listTargets = stubSimpleCall( + client.innerApiCalls.listRollouts = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listTargets(request), expectedError); + await assert.rejects(client.listRollouts(request), expectedError); const actualRequest = ( - client.innerApiCalls.listTargets as SinonStub + client.innerApiCalls.listRollouts as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTargets as SinonStub + client.innerApiCalls.listRollouts as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTargetsStream without error', async () => { + it('invokes listRolloutsStream without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), ]; - client.descriptors.page.listTargets.createStream = + client.descriptors.page.listRollouts.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listTargetsStream(request); + const stream = client.listRolloutsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Target[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + const responses: protos.google.cloud.deploy.v1.Rollout[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { responses.push(response); }); stream.on('end', () => { @@ -3997,12 +5700,12 @@ describe('v1.CloudDeployClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listTargets.createStream as SinonStub) + (client.descriptors.page.listRollouts.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listTargets, request) + .calledWith(client.innerApiCalls.listRollouts, request) ); assert( - (client.descriptors.page.listTargets.createStream as SinonStub) + (client.descriptors.page.listRollouts.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4010,30 +5713,30 @@ describe('v1.CloudDeployClient', () => { ); }); - it('invokes listTargetsStream with error', async () => { + it('invokes listRolloutsStream with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listTargets.createStream = stubPageStreamingCall( + client.descriptors.page.listRollouts.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listTargetsStream(request); + const stream = client.listRolloutsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Target[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Target) => { + const responses: protos.google.cloud.deploy.v1.Rollout[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { responses.push(response); }); stream.on('end', () => { @@ -4045,12 +5748,12 @@ describe('v1.CloudDeployClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listTargets.createStream as SinonStub) + (client.descriptors.page.listRollouts.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listTargets, request) + .calledWith(client.innerApiCalls.listRollouts, request) ); assert( - (client.descriptors.page.listTargets.createStream as SinonStub) + (client.descriptors.page.listRollouts.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4058,42 +5761,42 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listTargets without error', async () => { + it('uses async iteration with listRollouts without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Target()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), ]; - client.descriptors.page.listTargets.asyncIterate = + client.descriptors.page.listRollouts.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.ITarget[] = []; - const iterable = client.listTargetsAsync(request); + const responses: protos.google.cloud.deploy.v1.IRollout[] = []; + const iterable = client.listRolloutsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listRollouts.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listTargets.asyncIterate as SinonStub) + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4101,41 +5804,39 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listTargets with error', async () => { + it('uses async iteration with listRollouts with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListTargetsRequest() + new protos.google.cloud.deploy.v1.ListRolloutsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListTargetsRequest', + '.google.cloud.deploy.v1.ListRolloutsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listTargets.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listTargetsAsync(request); + client.descriptors.page.listRollouts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listRolloutsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.ITarget[] = []; + const responses: protos.google.cloud.deploy.v1.IRollout[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listTargets.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listRollouts.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listTargets.asyncIterate as SinonStub) + (client.descriptors.page.listRollouts.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4144,68 +5845,68 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('listReleases', () => { - it('invokes listReleases without error', async () => { + describe('listJobRuns', () => { + it('invokes listJobRuns without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), ]; - client.innerApiCalls.listReleases = stubSimpleCall(expectedResponse); - const [response] = await client.listReleases(request); + client.innerApiCalls.listJobRuns = stubSimpleCall(expectedResponse); + const [response] = await client.listJobRuns(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listReleases as SinonStub + client.innerApiCalls.listJobRuns as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listReleases as SinonStub + client.innerApiCalls.listJobRuns as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listReleases without error using callback', async () => { + it('invokes listJobRuns without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), ]; - client.innerApiCalls.listReleases = + client.innerApiCalls.listJobRuns = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listReleases( + client.listJobRuns( request, ( err?: Error | null, - result?: protos.google.cloud.deploy.v1.IRelease[] | null + result?: protos.google.cloud.deploy.v1.IJobRun[] | null ) => { if (err) { reject(err); @@ -4218,72 +5919,72 @@ describe('v1.CloudDeployClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listReleases as SinonStub + client.innerApiCalls.listJobRuns as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listReleases as SinonStub + client.innerApiCalls.listJobRuns as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listReleases with error', async () => { + it('invokes listJobRuns with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listReleases = stubSimpleCall( + client.innerApiCalls.listJobRuns = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listReleases(request), expectedError); + await assert.rejects(client.listJobRuns(request), expectedError); const actualRequest = ( - client.innerApiCalls.listReleases as SinonStub + client.innerApiCalls.listJobRuns as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listReleases as SinonStub + client.innerApiCalls.listJobRuns as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listReleasesStream without error', async () => { + it('invokes listJobRunsStream without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), ]; - client.descriptors.page.listReleases.createStream = + client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listReleasesStream(request); + const stream = client.listJobRunsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Release[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + const responses: protos.google.cloud.deploy.v1.JobRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { responses.push(response); }); stream.on('end', () => { @@ -4296,12 +5997,12 @@ describe('v1.CloudDeployClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listReleases.createStream as SinonStub) + (client.descriptors.page.listJobRuns.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listReleases, request) + .calledWith(client.innerApiCalls.listJobRuns, request) ); assert( - (client.descriptors.page.listReleases.createStream as SinonStub) + (client.descriptors.page.listJobRuns.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4309,30 +6010,30 @@ describe('v1.CloudDeployClient', () => { ); }); - it('invokes listReleasesStream with error', async () => { + it('invokes listJobRunsStream with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listReleases.createStream = stubPageStreamingCall( + client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall( undefined, expectedError ); - const stream = client.listReleasesStream(request); + const stream = client.listJobRunsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Release[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Release) => { + const responses: protos.google.cloud.deploy.v1.JobRun[] = []; + stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { responses.push(response); }); stream.on('end', () => { @@ -4344,12 +6045,12 @@ describe('v1.CloudDeployClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listReleases.createStream as SinonStub) + (client.descriptors.page.listJobRuns.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listReleases, request) + .calledWith(client.innerApiCalls.listJobRuns, request) ); assert( - (client.descriptors.page.listReleases.createStream as SinonStub) + (client.descriptors.page.listJobRuns.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4357,42 +6058,42 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listReleases without error', async () => { + it('uses async iteration with listJobRuns without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Release()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), ]; - client.descriptors.page.listReleases.asyncIterate = + client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IRelease[] = []; - const iterable = client.listReleasesAsync(request); + const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; + const iterable = client.listJobRunsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - ( - client.descriptors.page.listReleases.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - (client.descriptors.page.listReleases.asyncIterate as SinonStub) + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4400,39 +6101,41 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listReleases with error', async () => { + it('uses async iteration with listJobRuns with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListReleasesRequest() + new protos.google.cloud.deploy.v1.ListJobRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListReleasesRequest', + '.google.cloud.deploy.v1.ListJobRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listReleases.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listReleasesAsync(request); + client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listJobRunsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IRelease[] = []; + const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - ( - client.descriptors.page.listReleases.asyncIterate as SinonStub - ).getCall(0).args[1], + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub).getCall( + 0 + ).args[1], request ); assert( - (client.descriptors.page.listReleases.asyncIterate as SinonStub) + (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4441,68 +6144,68 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('listRollouts', () => { - it('invokes listRollouts without error', async () => { + describe('listAutomations', () => { + it('invokes listAutomations without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), ]; - client.innerApiCalls.listRollouts = stubSimpleCall(expectedResponse); - const [response] = await client.listRollouts(request); + client.innerApiCalls.listAutomations = stubSimpleCall(expectedResponse); + const [response] = await client.listAutomations(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listRollouts as SinonStub + client.innerApiCalls.listAutomations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listRollouts as SinonStub + client.innerApiCalls.listAutomations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listRollouts without error using callback', async () => { + it('invokes listAutomations without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), ]; - client.innerApiCalls.listRollouts = + client.innerApiCalls.listAutomations = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listRollouts( + client.listAutomations( request, ( err?: Error | null, - result?: protos.google.cloud.deploy.v1.IRollout[] | null + result?: protos.google.cloud.deploy.v1.IAutomation[] | null ) => { if (err) { reject(err); @@ -4515,74 +6218,77 @@ describe('v1.CloudDeployClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listRollouts as SinonStub + client.innerApiCalls.listAutomations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listRollouts as SinonStub + client.innerApiCalls.listAutomations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listRollouts with error', async () => { + it('invokes listAutomations with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listRollouts = stubSimpleCall( + client.innerApiCalls.listAutomations = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listRollouts(request), expectedError); + await assert.rejects(client.listAutomations(request), expectedError); const actualRequest = ( - client.innerApiCalls.listRollouts as SinonStub + client.innerApiCalls.listAutomations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listRollouts as SinonStub + client.innerApiCalls.listAutomations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listRolloutsStream without error', async () => { + it('invokes listAutomationsStream without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), ]; - client.descriptors.page.listRollouts.createStream = + client.descriptors.page.listAutomations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listRolloutsStream(request); + const stream = client.listAutomationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Rollout[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { - responses.push(response); - }); + const responses: protos.google.cloud.deploy.v1.Automation[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.Automation) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -4593,12 +6299,12 @@ describe('v1.CloudDeployClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listRollouts.createStream as SinonStub) + (client.descriptors.page.listAutomations.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listRollouts, request) + .calledWith(client.innerApiCalls.listAutomations, request) ); assert( - (client.descriptors.page.listRollouts.createStream as SinonStub) + (client.descriptors.page.listAutomations.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4606,32 +6312,33 @@ describe('v1.CloudDeployClient', () => { ); }); - it('invokes listRolloutsStream with error', async () => { + it('invokes listAutomationsStream with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listRollouts.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listRolloutsStream(request); + client.descriptors.page.listAutomations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAutomationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.Rollout[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.Rollout) => { - responses.push(response); - }); + const responses: protos.google.cloud.deploy.v1.Automation[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.Automation) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -4641,12 +6348,12 @@ describe('v1.CloudDeployClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listRollouts.createStream as SinonStub) + (client.descriptors.page.listAutomations.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listRollouts, request) + .calledWith(client.innerApiCalls.listAutomations, request) ); assert( - (client.descriptors.page.listRollouts.createStream as SinonStub) + (client.descriptors.page.listAutomations.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4654,42 +6361,42 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listRollouts without error', async () => { + it('uses async iteration with listAutomations without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), - generateSampleMessage(new protos.google.cloud.deploy.v1.Rollout()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), + generateSampleMessage(new protos.google.cloud.deploy.v1.Automation()), ]; - client.descriptors.page.listRollouts.asyncIterate = + client.descriptors.page.listAutomations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IRollout[] = []; - const iterable = client.listRolloutsAsync(request); + const responses: protos.google.cloud.deploy.v1.IAutomation[] = []; + const iterable = client.listAutomationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listRollouts.asyncIterate as SinonStub + client.descriptors.page.listAutomations.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + (client.descriptors.page.listAutomations.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4697,39 +6404,39 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listRollouts with error', async () => { + it('uses async iteration with listAutomations with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListRolloutsRequest() + new protos.google.cloud.deploy.v1.ListAutomationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListRolloutsRequest', + '.google.cloud.deploy.v1.ListAutomationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listRollouts.asyncIterate = + client.descriptors.page.listAutomations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listRolloutsAsync(request); + const iterable = client.listAutomationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IRollout[] = []; + const responses: protos.google.cloud.deploy.v1.IAutomation[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listRollouts.asyncIterate as SinonStub + client.descriptors.page.listAutomations.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listRollouts.asyncIterate as SinonStub) + (client.descriptors.page.listAutomations.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4738,68 +6445,81 @@ describe('v1.CloudDeployClient', () => { }); }); - describe('listJobRuns', () => { - it('invokes listJobRuns without error', async () => { + describe('listAutomationRuns', () => { + it('invokes listAutomationRuns without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), ]; - client.innerApiCalls.listJobRuns = stubSimpleCall(expectedResponse); - const [response] = await client.listJobRuns(request); + client.innerApiCalls.listAutomationRuns = + stubSimpleCall(expectedResponse); + const [response] = await client.listAutomationRuns(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listJobRuns as SinonStub + client.innerApiCalls.listAutomationRuns as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listJobRuns as SinonStub + client.innerApiCalls.listAutomationRuns as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listJobRuns without error using callback', async () => { + it('invokes listAutomationRuns without error using callback', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), ]; - client.innerApiCalls.listJobRuns = + client.innerApiCalls.listAutomationRuns = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listJobRuns( + client.listAutomationRuns( request, ( err?: Error | null, - result?: protos.google.cloud.deploy.v1.IJobRun[] | null + result?: protos.google.cloud.deploy.v1.IAutomationRun[] | null ) => { if (err) { reject(err); @@ -4812,74 +6532,83 @@ describe('v1.CloudDeployClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listJobRuns as SinonStub + client.innerApiCalls.listAutomationRuns as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listJobRuns as SinonStub + client.innerApiCalls.listAutomationRuns as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listJobRuns with error', async () => { + it('invokes listAutomationRuns with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listJobRuns = stubSimpleCall( + client.innerApiCalls.listAutomationRuns = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listJobRuns(request), expectedError); + await assert.rejects(client.listAutomationRuns(request), expectedError); const actualRequest = ( - client.innerApiCalls.listJobRuns as SinonStub + client.innerApiCalls.listAutomationRuns as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listJobRuns as SinonStub + client.innerApiCalls.listAutomationRuns as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listJobRunsStream without error', async () => { + it('invokes listAutomationRunsStream without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), ]; - client.descriptors.page.listJobRuns.createStream = + client.descriptors.page.listAutomationRuns.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listJobRunsStream(request); + const stream = client.listAutomationRunsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.JobRun[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { - responses.push(response); - }); + const responses: protos.google.cloud.deploy.v1.AutomationRun[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.AutomationRun) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -4890,12 +6619,12 @@ describe('v1.CloudDeployClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listJobRuns.createStream as SinonStub) + (client.descriptors.page.listAutomationRuns.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listJobRuns, request) + .calledWith(client.innerApiCalls.listAutomationRuns, request) ); assert( - (client.descriptors.page.listJobRuns.createStream as SinonStub) + (client.descriptors.page.listAutomationRuns.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4903,32 +6632,33 @@ describe('v1.CloudDeployClient', () => { ); }); - it('invokes listJobRunsStream with error', async () => { + it('invokes listAutomationRunsStream with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listJobRuns.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listJobRunsStream(request); + client.descriptors.page.listAutomationRuns.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAutomationRunsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.deploy.v1.JobRun[] = []; - stream.on('data', (response: protos.google.cloud.deploy.v1.JobRun) => { - responses.push(response); - }); + const responses: protos.google.cloud.deploy.v1.AutomationRun[] = []; + stream.on( + 'data', + (response: protos.google.cloud.deploy.v1.AutomationRun) => { + responses.push(response); + } + ); stream.on('end', () => { resolve(responses); }); @@ -4938,12 +6668,12 @@ describe('v1.CloudDeployClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listJobRuns.createStream as SinonStub) + (client.descriptors.page.listAutomationRuns.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listJobRuns, request) + .calledWith(client.innerApiCalls.listAutomationRuns, request) ); assert( - (client.descriptors.page.listJobRuns.createStream as SinonStub) + (client.descriptors.page.listAutomationRuns.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4951,42 +6681,48 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listJobRuns without error', async () => { + it('uses async iteration with listAutomationRuns without error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), - generateSampleMessage(new protos.google.cloud.deploy.v1.JobRun()), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), + generateSampleMessage( + new protos.google.cloud.deploy.v1.AutomationRun() + ), ]; - client.descriptors.page.listJobRuns.asyncIterate = + client.descriptors.page.listAutomationRuns.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; - const iterable = client.listJobRunsAsync(request); + const responses: protos.google.cloud.deploy.v1.IAutomationRun[] = []; + const iterable = client.listAutomationRunsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -4994,41 +6730,39 @@ describe('v1.CloudDeployClient', () => { ); }); - it('uses async iteration with listJobRuns with error', async () => { + it('uses async iteration with listAutomationRuns with error', async () => { const client = new clouddeployModule.v1.CloudDeployClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.deploy.v1.ListJobRunsRequest() + new protos.google.cloud.deploy.v1.ListAutomationRunsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.deploy.v1.ListJobRunsRequest', + '.google.cloud.deploy.v1.ListAutomationRunsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listJobRuns.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listJobRunsAsync(request); + client.descriptors.page.listAutomationRuns.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAutomationRunsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.deploy.v1.IJobRun[] = []; + const responses: protos.google.cloud.deploy.v1.IAutomationRun[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listJobRuns.asyncIterate as SinonStub) + (client.descriptors.page.listAutomationRuns.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -5865,6 +7599,159 @@ describe('v1.CloudDeployClient', () => { }); describe('Path templates', () => { + describe('automation', () => { + const fakePath = '/rendered/path/automation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + delivery_pipeline: 'deliveryPipelineValue', + automation: 'automationValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automationPath', () => { + const result = client.automationPath( + 'projectValue', + 'locationValue', + 'deliveryPipelineValue', + 'automationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.automationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAutomationName', () => { + const result = client.matchProjectFromAutomationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAutomationName', () => { + const result = client.matchLocationFromAutomationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeliveryPipelineFromAutomationName', () => { + const result = client.matchDeliveryPipelineFromAutomationName(fakePath); + assert.strictEqual(result, 'deliveryPipelineValue'); + assert( + (client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAutomationFromAutomationName', () => { + const result = client.matchAutomationFromAutomationName(fakePath); + assert.strictEqual(result, 'automationValue'); + assert( + (client.pathTemplates.automationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('automationRun', () => { + const fakePath = '/rendered/path/automationRun'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + delivery_pipeline: 'deliveryPipelineValue', + automation_run: 'automationRunValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.automationRunPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.automationRunPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('automationRunPath', () => { + const result = client.automationRunPath( + 'projectValue', + 'locationValue', + 'deliveryPipelineValue', + 'automationRunValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.automationRunPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAutomationRunName', () => { + const result = client.matchProjectFromAutomationRunName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAutomationRunName', () => { + const result = client.matchLocationFromAutomationRunName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeliveryPipelineFromAutomationRunName', () => { + const result = + client.matchDeliveryPipelineFromAutomationRunName(fakePath); + assert.strictEqual(result, 'deliveryPipelineValue'); + assert( + (client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAutomationRunFromAutomationRunName', () => { + const result = client.matchAutomationRunFromAutomationRunName(fakePath); + assert.strictEqual(result, 'automationRunValue'); + assert( + (client.pathTemplates.automationRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('build', () => { const fakePath = '/rendered/path/build'; const expectedParameters = { @@ -6110,6 +7997,70 @@ describe('v1.CloudDeployClient', () => { }); }); + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + job: 'jobValue', + }; + const client = new clouddeployModule.v1.CloudDeployClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('jobRun', () => { const fakePath = '/rendered/path/jobRun'; const expectedParameters = {